func (s *Server) CreateStream(id string) *Stream {
	s.mu.Lock()
	defer s.mu.Unlock()

	if s.Streams[id] != nil {
		return s.Streams[id]
	}

	str := newStream(s.BufferSize, s.AutoReplay)
	str.run()

	s.Streams[id] = str

	return str
}
func (s *Server) CreateStream(id string) *Stream {
	s.mu.Lock()
	defer s.mu.Unlock()

	if s.Streams[id] != nil {
		return s.Streams[id]
	}

	str := newStream(s.BufferSize, s.AutoReplay)
	str.run()

	s.Streams[id] = str

	return str
}
func ( s * Server ) CreateStream ( id string ) * Stream { s . mu . Lock ( ) defer s . mu . Unlock ( ) if s . Streams [ id ] != nil { return s . Streams [ id ] } str := newStream ( s . BufferSize , s . AutoReplay ) str . run ( ) s . Streams [ id ] = str return str }
// CreateStream will create a new stream and register it
CreateStream will create a new stream and register it