mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine utest, move the mock io to handshake where actually use it.
This commit is contained in:
parent
94cf0c1069
commit
7c7920698d
4 changed files with 91 additions and 91 deletions
|
|
@ -36,67 +36,6 @@ ISrsThreadContext* _srs_context = new ISrsThreadContext();
|
|||
SrsConfig* _srs_config = NULL;
|
||||
SrsServer* _srs_server = NULL;
|
||||
|
||||
MockEmptyIO::MockEmptyIO()
|
||||
{
|
||||
}
|
||||
|
||||
MockEmptyIO::~MockEmptyIO()
|
||||
{
|
||||
}
|
||||
|
||||
bool MockEmptyIO::is_never_timeout(int64_t /*timeout_us*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int MockEmptyIO::read_fully(void* /*buf*/, size_t /*size*/, ssize_t* /*nread*/)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
int MockEmptyIO::write(void* /*buf*/, size_t /*size*/, ssize_t* /*nwrite*/)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
void MockEmptyIO::set_recv_timeout(int64_t /*timeout_us*/)
|
||||
{
|
||||
}
|
||||
|
||||
int64_t MockEmptyIO::get_recv_timeout()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64_t MockEmptyIO::get_recv_bytes()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void MockEmptyIO::set_send_timeout(int64_t /*timeout_us*/)
|
||||
{
|
||||
}
|
||||
|
||||
int64_t MockEmptyIO::get_send_timeout()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t MockEmptyIO::get_send_bytes()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MockEmptyIO::writev(const iovec */*iov*/, int /*iov_size*/, ssize_t* /*nwrite*/)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
int MockEmptyIO::read(void* /*buf*/, size_t /*size*/, ssize_t* /*nread*/)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
// basic test and samples.
|
||||
VOID TEST(SampleTest, FastSampleInt64Test)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue