mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, rename SrsSocket to SrsStSocket
This commit is contained in:
parent
b19d2e8e2d
commit
6ee9ea341a
16 changed files with 106 additions and 106 deletions
|
@ -26,53 +26,53 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
|
||||
SrsSocket::SrsSocket(st_netfd_t client_stfd)
|
||||
SrsStSocket::SrsStSocket(st_netfd_t client_stfd)
|
||||
{
|
||||
stfd = client_stfd;
|
||||
send_timeout = recv_timeout = ST_UTIME_NO_TIMEOUT;
|
||||
recv_bytes = send_bytes = 0;
|
||||
}
|
||||
|
||||
SrsSocket::~SrsSocket()
|
||||
SrsStSocket::~SrsStSocket()
|
||||
{
|
||||
}
|
||||
|
||||
bool SrsSocket::is_never_timeout(int64_t timeout_us)
|
||||
bool SrsStSocket::is_never_timeout(int64_t timeout_us)
|
||||
{
|
||||
return timeout_us == (int64_t)ST_UTIME_NO_TIMEOUT;
|
||||
}
|
||||
|
||||
void SrsSocket::set_recv_timeout(int64_t timeout_us)
|
||||
void SrsStSocket::set_recv_timeout(int64_t timeout_us)
|
||||
{
|
||||
recv_timeout = timeout_us;
|
||||
}
|
||||
|
||||
int64_t SrsSocket::get_recv_timeout()
|
||||
int64_t SrsStSocket::get_recv_timeout()
|
||||
{
|
||||
return recv_timeout;
|
||||
}
|
||||
|
||||
void SrsSocket::set_send_timeout(int64_t timeout_us)
|
||||
void SrsStSocket::set_send_timeout(int64_t timeout_us)
|
||||
{
|
||||
send_timeout = timeout_us;
|
||||
}
|
||||
|
||||
int64_t SrsSocket::get_send_timeout()
|
||||
int64_t SrsStSocket::get_send_timeout()
|
||||
{
|
||||
return send_timeout;
|
||||
}
|
||||
|
||||
int64_t SrsSocket::get_recv_bytes()
|
||||
int64_t SrsStSocket::get_recv_bytes()
|
||||
{
|
||||
return recv_bytes;
|
||||
}
|
||||
|
||||
int64_t SrsSocket::get_send_bytes()
|
||||
int64_t SrsStSocket::get_send_bytes()
|
||||
{
|
||||
return send_bytes;
|
||||
}
|
||||
|
||||
int SrsSocket::read(void* buf, size_t size, ssize_t* nread)
|
||||
int SrsStSocket::read(void* buf, size_t size, ssize_t* nread)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -100,7 +100,7 @@ int SrsSocket::read(void* buf, size_t size, ssize_t* nread)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsSocket::read_fully(void* buf, size_t size, ssize_t* nread)
|
||||
int SrsStSocket::read_fully(void* buf, size_t size, ssize_t* nread)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -128,7 +128,7 @@ int SrsSocket::read_fully(void* buf, size_t size, ssize_t* nread)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsSocket::write(void* buf, size_t size, ssize_t* nwrite)
|
||||
int SrsStSocket::write(void* buf, size_t size, ssize_t* nwrite)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -150,7 +150,7 @@ int SrsSocket::write(void* buf, size_t size, ssize_t* nwrite)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsSocket::writev(const iovec *iov, int iov_size, ssize_t* nwrite)
|
||||
int SrsStSocket::writev(const iovec *iov, int iov_size, ssize_t* nwrite)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue