mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
change to 0.9.19, verify the s1/s2/c2, refine the handshake.
This commit is contained in:
parent
152d3539d8
commit
841f0f8899
8 changed files with 349 additions and 118 deletions
|
@ -108,11 +108,38 @@ enum SrsClientType
|
|||
};
|
||||
std::string srs_client_type_string(SrsClientType type);
|
||||
|
||||
/**
|
||||
* store the handshake bytes,
|
||||
* for smart switch between complex and simple handshake.
|
||||
*/
|
||||
class SrsHandshakeBytes
|
||||
{
|
||||
public:
|
||||
// [1+1536]
|
||||
char* c0c1;
|
||||
// [1+1536+1536]
|
||||
char* s0s1s2;
|
||||
// [1536]
|
||||
char* c2;
|
||||
public:
|
||||
SrsHandshakeBytes();
|
||||
virtual ~SrsHandshakeBytes();
|
||||
public:
|
||||
virtual int read_c0c1(ISrsProtocolReaderWriter* io);
|
||||
virtual int read_s0s1s2(ISrsProtocolReaderWriter* io);
|
||||
virtual int read_c2(ISrsProtocolReaderWriter* io);
|
||||
virtual int create_c0c1();
|
||||
virtual int create_s0s1s2();
|
||||
virtual int create_c2();
|
||||
};
|
||||
|
||||
/**
|
||||
* implements the client role protocol.
|
||||
*/
|
||||
class SrsRtmpClient
|
||||
{
|
||||
private:
|
||||
SrsHandshakeBytes* hs_bytes;
|
||||
protected:
|
||||
SrsProtocol* protocol;
|
||||
ISrsProtocolReaderWriter* io;
|
||||
|
@ -155,6 +182,7 @@ public:
|
|||
class SrsRtmpServer
|
||||
{
|
||||
private:
|
||||
SrsHandshakeBytes* hs_bytes;
|
||||
SrsProtocol* protocol;
|
||||
ISrsProtocolReaderWriter* io;
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue