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
|
@ -26,6 +26,67 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <srs_core_autofree.hpp>
|
||||
#include <srs_protocol_utility.hpp>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
|
||||
// verify the sha256
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue