mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
finish utest for handshake.
This commit is contained in:
parent
6b84a5e14c
commit
a470330383
5 changed files with 157 additions and 105 deletions
|
@ -36,6 +36,77 @@ 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(const void* /*buf*/, size_t /*size*/, ssize_t* /*nread*/)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
int MockEmptyIO::write(const 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;
|
||||
}
|
||||
|
||||
int MockEmptyIO::get_recv_kbps()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
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::get_send_kbps()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MockEmptyIO::writev(const iovec */*iov*/, int /*iov_size*/, ssize_t* /*nwrite*/)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
int MockEmptyIO::read(const 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