1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine set_send_timeout in time unit

This commit is contained in:
winlin 2019-04-17 08:18:37 +08:00
parent a1398892d0
commit f4bee37e76
14 changed files with 34 additions and 34 deletions

View file

@ -117,10 +117,10 @@ public:
// for protocol
public:
/**
* Set the timeout tm in ms for send bytes to peer.
* Set the timeout tm in srs_utime_t for send bytes to peer.
* @remark Use SRS_UTIME_NO_TIMEOUT to never timeout.
*/
virtual void set_send_timeout(int64_t tm) = 0;
virtual void set_send_timeout(srs_utime_t tm) = 0;
/**
* Get the timeout in ms for send bytes to peer.
*/

View file

@ -314,7 +314,7 @@ int64_t SrsProtocol::get_recv_timeout()
return skt->get_recv_timeout();
}
void SrsProtocol::set_send_timeout(int64_t tm)
void SrsProtocol::set_send_timeout(srs_utime_t tm)
{
return skt->set_send_timeout(tm);
}
@ -1820,7 +1820,7 @@ void SrsRtmpClient::set_recv_timeout(int64_t tm)
protocol->set_recv_timeout(tm);
}
void SrsRtmpClient::set_send_timeout(int64_t tm)
void SrsRtmpClient::set_send_timeout(srs_utime_t tm)
{
protocol->set_send_timeout(tm);
}
@ -2220,7 +2220,7 @@ int64_t SrsRtmpServer::get_recv_timeout()
return protocol->get_recv_timeout();
}
void SrsRtmpServer::set_send_timeout(int64_t tm)
void SrsRtmpServer::set_send_timeout(srs_utime_t tm)
{
protocol->set_send_timeout(tm);
}

View file

@ -311,10 +311,10 @@ public:
virtual void set_recv_timeout(int64_t tm);
virtual int64_t get_recv_timeout();
/**
* set/get the send timeout in ms.
* set/get the send timeout in srs_utime_t.
* if timeout, recv/send message return ERROR_SOCKET_TIMEOUT.
*/
virtual void set_send_timeout(int64_t tm);
virtual void set_send_timeout(srs_utime_t tm);
virtual int64_t get_send_timeout();
/**
* get recv/send bytes.
@ -689,7 +689,7 @@ public:
// protocol methods proxy
public:
virtual void set_recv_timeout(int64_t tm);
virtual void set_send_timeout(int64_t tm);
virtual void set_send_timeout(srs_utime_t tm);
virtual int64_t get_recv_bytes();
virtual int64_t get_send_bytes();
virtual srs_error_t recv_message(SrsCommonMessage** pmsg);
@ -811,10 +811,10 @@ public:
virtual void set_recv_timeout(int64_t tm);
virtual int64_t get_recv_timeout();
/**
* set/get the send timeout in ms.
* set/get the send timeout in srs_utime_t.
* if timeout, recv/send message return ERROR_SOCKET_TIMEOUT.
*/
virtual void set_send_timeout(int64_t tm);
virtual void set_send_timeout(srs_utime_t tm);
virtual int64_t get_send_timeout();
/**
* get recv/send bytes.