Source File
streams_map.go
Belonging Package
github.com/quic-go/webtransport-go
package webtransportimport ()type closeFunc func()// The streamsMap manages the streams of a single QUIC connection.// Note that several WebTransport sessions can share one QUIC connection.type streamsMap struct {mx sync.Mutexm map[quic.StreamID]closeFunc}func newStreamsMap() *streamsMap {return &streamsMap{m: make(map[quic.StreamID]closeFunc)}}func ( *streamsMap) ( quic.StreamID, closeFunc) {.mx.Lock().m[] =.mx.Unlock()}func ( *streamsMap) ( quic.StreamID) {.mx.Lock()delete(.m, ).mx.Unlock()}func ( *streamsMap) () {.mx.Lock()defer .mx.Unlock()for , := range .m {()}.m = nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |