mirror of
https://github.com/aler9/gortsplib
synced 2025-10-23 15:13:30 +08:00
rename ServerConn.EnableFrames into ServerConn.EnableReadFrames
This commit is contained in:
@@ -23,7 +23,7 @@ type ServerConn struct {
|
|||||||
br *bufio.Reader
|
br *bufio.Reader
|
||||||
bw *bufio.Writer
|
bw *bufio.Writer
|
||||||
mutex sync.Mutex
|
mutex sync.Mutex
|
||||||
frames bool
|
readFrames bool
|
||||||
readTimeout bool
|
readTimeout bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,9 +37,9 @@ func (sc *ServerConn) NetConn() net.Conn {
|
|||||||
return sc.nconn
|
return sc.nconn
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnableFrames allows or denies receiving frames.
|
// EnableReadFrames allows or denies receiving frames.
|
||||||
func (sc *ServerConn) EnableFrames(v bool) {
|
func (sc *ServerConn) EnableReadFrames(v bool) {
|
||||||
sc.frames = v
|
sc.readFrames = v
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnableReadTimeout sets or removes the timeout on incoming packets.
|
// EnableReadTimeout sets or removes the timeout on incoming packets.
|
||||||
@@ -91,7 +91,7 @@ outer:
|
|||||||
sc.nconn.SetReadDeadline(time.Time{})
|
sc.nconn.SetReadDeadline(time.Time{})
|
||||||
}
|
}
|
||||||
|
|
||||||
if sc.frames {
|
if sc.readFrames {
|
||||||
frame.Content = tcpFrameBuffer.Next()
|
frame.Content = tcpFrameBuffer.Next()
|
||||||
what, err := base.ReadInterleavedFrameOrRequest(&frame, &req, sc.br)
|
what, err := base.ReadInterleavedFrameOrRequest(&frame, &req, sc.br)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user