mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine get_recv_timeout and is_never_timeout in time unit
This commit is contained in:
parent
d3dc45f357
commit
5a45fd98c3
9 changed files with 28 additions and 28 deletions
|
@ -88,7 +88,7 @@ public:
|
|||
// @remark Use SRS_UTIME_NO_TIMEOUT to never timeout.
|
||||
virtual void set_recv_timeout(srs_utime_t tm) = 0;
|
||||
// Get the timeout in ms for recv bytes from peer.
|
||||
virtual int64_t get_recv_timeout() = 0;
|
||||
virtual srs_utime_t get_recv_timeout() = 0;
|
||||
// For handshake.
|
||||
public:
|
||||
// Read specified size bytes of data
|
||||
|
@ -124,7 +124,7 @@ public:
|
|||
// For protocol
|
||||
public:
|
||||
// Whether the specified tm in ms is never timeout.
|
||||
virtual bool is_never_timeout(int64_t tm) = 0;
|
||||
virtual bool is_never_timeout(srs_utime_t tm) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -309,7 +309,7 @@ void SrsProtocol::set_recv_timeout(srs_utime_t tm)
|
|||
return skt->set_recv_timeout(tm);
|
||||
}
|
||||
|
||||
int64_t SrsProtocol::get_recv_timeout()
|
||||
srs_utime_t SrsProtocol::get_recv_timeout()
|
||||
{
|
||||
return skt->get_recv_timeout();
|
||||
}
|
||||
|
@ -2215,7 +2215,7 @@ void SrsRtmpServer::set_recv_timeout(srs_utime_t tm)
|
|||
protocol->set_recv_timeout(tm);
|
||||
}
|
||||
|
||||
int64_t SrsRtmpServer::get_recv_timeout()
|
||||
srs_utime_t SrsRtmpServer::get_recv_timeout()
|
||||
{
|
||||
return protocol->get_recv_timeout();
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ public:
|
|||
* if timeout, recv/send message return ERROR_SOCKET_TIMEOUT.
|
||||
*/
|
||||
virtual void set_recv_timeout(srs_utime_t tm);
|
||||
virtual int64_t get_recv_timeout();
|
||||
virtual srs_utime_t get_recv_timeout();
|
||||
/**
|
||||
* set/get the send timeout in srs_utime_t.
|
||||
* if timeout, recv/send message return ERROR_SOCKET_TIMEOUT.
|
||||
|
@ -808,7 +808,7 @@ public:
|
|||
* if timeout, recv/send message return ERROR_SOCKET_TIMEOUT.
|
||||
*/
|
||||
virtual void set_recv_timeout(srs_utime_t tm);
|
||||
virtual int64_t get_recv_timeout();
|
||||
virtual srs_utime_t get_recv_timeout();
|
||||
/**
|
||||
* set/get the send timeout in srs_utime_t.
|
||||
* if timeout, recv/send message return ERROR_SOCKET_TIMEOUT.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue