1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1042, cover RTMP handshake protocol.

This commit is contained in:
winlin 2019-12-11 14:32:57 +08:00
parent 7bd7e1ccca
commit f51f1efe42
8 changed files with 219 additions and 11 deletions

View file

@ -108,6 +108,22 @@ MockBufferIO* MockBufferIO::append(string data)
return this;
}
MockBufferIO* MockBufferIO::append(uint8_t* data, int size)
{
in_buffer.append((char*)data, size);
return this;
}
int MockBufferIO::in_length()
{
return in_buffer.length();
}
int MockBufferIO::out_length()
{
return out_buffer.length();
}
srs_error_t MockBufferIO::read_fully(void* buf, size_t size, ssize_t* nread)
{
if (in_err != srs_success) {