client: switch to TCP if no UDP packets have been received within a timeout (https://github.com/aler9/rtsp-simple-server/issues/173)

This commit is contained in:
aler9
2021-03-26 23:02:36 +01:00
parent 3a38a93b66
commit 2df9029f01
8 changed files with 473 additions and 154 deletions

View File

@@ -45,7 +45,7 @@ func newClientConnUDPListener(c *ClientConn, port int) (*clientConnUDPListener,
pc: pc,
frameBuffer: multibuffer.New(uint64(c.conf.ReadBufferCount), uint64(c.conf.ReadBufferSize)),
lastFrameTime: func() *int64 {
v := time.Now().Unix()
v := int64(0)
return &v
}(),
}, nil