client multiplexing using a webRTCConn channel (#31)

This commit is contained in:
Serene Han 2016-03-22 18:03:25 -07:00 committed by Arlo Breault
parent 2515ddb1fa
commit a8ea5e586e
2 changed files with 30 additions and 16 deletions

View file

@ -24,6 +24,7 @@ type webRTCConn struct {
writePipe *io.PipeWriter
buffer bytes.Buffer
reset chan struct{}
active bool
*BytesInfo
}
@ -86,6 +87,7 @@ func NewWebRTCConnection(config *webrtc.Configuration,
// creation & local description setting, which happens asynchronously.
connection.errorChannel = make(chan error, 1)
connection.reset = make(chan struct{}, 1)
connection.active = false
// Log every few seconds.
connection.BytesInfo = &BytesInfo{