func (s *StreamSession) getStreamChan(stream *spdystream.Stream) chan *spdystream.Stream { if stream == nil { return s.streamChan } streamChan, ok := s.subStreamChans[stream.String()] if ok { return streamChan } return s.streamChan }
func (s *Server) getStreamChan(stream *spdystream.Stream) chan *spdystream.Stream { if stream == nil { return s.streamChan } s.streamLock.RLock() defer s.streamLock.RUnlock() streamChan, ok := s.subStreamChans[stream.String()] if ok { return streamChan } return s.streamChan }
func (l *ListenSession) getStreamChan(stream *spdystream.Stream) chan *spdystream.Stream { if stream == nil { return l.streamChan } l.streamLock.RLock() defer l.streamLock.RUnlock() streamChan, ok := l.subStreamChans[stream.String()] if ok { return streamChan } return l.streamChan }
func (s *Server) addStreamChan(stream *spdystream.Stream, streamChan chan *spdystream.Stream) { s.streamLock.Lock() s.subStreamChans[stream.String()] = streamChan s.streamLock.Unlock() }
func (l *ListenSession) addStreamChan(stream *spdystream.Stream, streamChan chan *spdystream.Stream) { l.streamLock.Lock() l.subStreamChans[stream.String()] = streamChan l.streamLock.Unlock() }
func (s *StreamSession) addStreamChan(stream *spdystream.Stream, streamChan chan *spdystream.Stream) { s.subStreamChans[stream.String()] = streamChan }