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

WebRTC: Refine code and destroy session when tcp close.

This commit is contained in:
Li Peng 2022-09-04 21:24:51 +08:00 committed by winlin
parent 07339e1417
commit efa0851476
10 changed files with 181 additions and 157 deletions

View file

@ -170,7 +170,7 @@ public:
// With a small fast read buffer, to support peek for protocol detecting. Note that directly write to io without any
// cache or buffer.
class SrsBufferedReader : public ISrsProtocolReadWriter
class SrsBufferedReadWriter : public ISrsProtocolReadWriter
{
private:
// The under-layer transport.
@ -181,8 +181,8 @@ private:
// Current reading position.
SrsBuffer* buf_;
public:
SrsBufferedReader(ISrsProtocolReadWriter* io);
virtual ~SrsBufferedReader();
SrsBufferedReadWriter(ISrsProtocolReadWriter* io);
virtual ~SrsBufferedReadWriter();
public:
// Peek the head of cache to buf in size of bytes.
srs_error_t peek(char* buf, int* size);