mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Migrate is_never_timeout to utility.
This commit is contained in:
parent
1b37b90b8f
commit
ccba55cdd8
8 changed files with 8 additions and 42 deletions
|
@ -362,6 +362,11 @@ ssize_t srs_read(srs_netfd_t stfd, void *buf, size_t nbyte, srs_utime_t timeout)
|
|||
return st_read((st_netfd_t)stfd, buf, nbyte, (st_utime_t)timeout);
|
||||
}
|
||||
|
||||
bool srs_is_never_timeout(srs_utime_t tm)
|
||||
{
|
||||
return tm == SRS_UTIME_NO_TIMEOUT;
|
||||
}
|
||||
|
||||
SrsStSocket::SrsStSocket()
|
||||
{
|
||||
stfd = NULL;
|
||||
|
@ -379,11 +384,6 @@ srs_error_t SrsStSocket::initialize(srs_netfd_t fd)
|
|||
return srs_success;
|
||||
}
|
||||
|
||||
bool SrsStSocket::is_never_timeout(srs_utime_t tm)
|
||||
{
|
||||
return tm == SRS_UTIME_NO_TIMEOUT;
|
||||
}
|
||||
|
||||
void SrsStSocket::set_recv_timeout(srs_utime_t tm)
|
||||
{
|
||||
rtm = tm;
|
||||
|
@ -593,11 +593,6 @@ void SrsTcpClient::close()
|
|||
srs_close_stfd(stfd);
|
||||
}
|
||||
|
||||
bool SrsTcpClient::is_never_timeout(srs_utime_t tm)
|
||||
{
|
||||
return io->is_never_timeout(tm);
|
||||
}
|
||||
|
||||
void SrsTcpClient::set_recv_timeout(srs_utime_t tm)
|
||||
{
|
||||
io->set_recv_timeout(tm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue