mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 07:37:07 +08:00
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:
@@ -139,7 +139,16 @@ type ErrClientNoUDPPacketsRecently struct{}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrClientNoUDPPacketsRecently) Error() string {
|
||||
return "no UDP packets received recently (maybe there's a firewall/NAT in between)"
|
||||
return "no UDP packets received (maybe there's a firewall/NAT in between)"
|
||||
}
|
||||
|
||||
// ErrClientUDPTimeout is returned when UDP packets have been received previously
|
||||
// but now nothing is being received.
|
||||
type ErrClientUDPTimeout struct{}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrClientUDPTimeout) Error() string {
|
||||
return "UDP timeout"
|
||||
}
|
||||
|
||||
// ErrClientRTPInfoInvalid is returned in case of an invalid RTP-Info.
|
||||
|
Reference in New Issue
Block a user