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:
parent
7bd7e1ccca
commit
f51f1efe42
8 changed files with 219 additions and 11 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue