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:
parent
07339e1417
commit
efa0851476
10 changed files with 181 additions and 157 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue