Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
307 B

package bytecounter
import (
"io"
)
// ReadWriter allows to count read and written bytes.
type ReadWriter struct {
*Reader
*Writer
}
// NewReadWriter allocates a ReadWriter.
func NewReadWriter(rw io.ReadWriter) *ReadWriter {
return &ReadWriter{
Reader: NewReader(rw),
Writer: NewWriter(rw),
}
}