Exemple #1
0
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
}
Exemple #2
0
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
}
Exemple #3
0
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
}
Exemple #4
0
func (s *Server) addStreamChan(stream *spdystream.Stream, streamChan chan *spdystream.Stream) {
	s.streamLock.Lock()
	s.subStreamChans[stream.String()] = streamChan
	s.streamLock.Unlock()
}
Exemple #5
0
func (l *ListenSession) addStreamChan(stream *spdystream.Stream, streamChan chan *spdystream.Stream) {
	l.streamLock.Lock()
	l.subStreamChans[stream.String()] = streamChan
	l.streamLock.Unlock()
}
Exemple #6
0
func (s *StreamSession) addStreamChan(stream *spdystream.Stream, streamChan chan *spdystream.Stream) {
	s.subStreamChans[stream.String()] = streamChan
}