mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine socket buffer, append bytes to vector directly
This commit is contained in:
parent
c0b6982e0d
commit
a5339c2a27
1 changed files with 1 additions and 3 deletions
|
@ -54,9 +54,7 @@ void SrsBuffer::erase(int size)
|
|||
|
||||
void SrsBuffer::append(char* bytes, int size)
|
||||
{
|
||||
std::vector<char> vec(bytes, bytes + size);
|
||||
|
||||
data.insert(data.end(), vec.begin(), vec.end());
|
||||
data.insert(data.end(), bytes, bytes + size);
|
||||
}
|
||||
|
||||
int SrsBuffer::ensure_buffer_bytes(SrsSocket* skt, int required_size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue