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

extract protocol io interface to prepare to extract the protocol from underlayer socket.

This commit is contained in:
winlin 2014-03-01 12:43:04 +08:00
parent a73dec4c41
commit 7dfc902b87
18 changed files with 247 additions and 95 deletions

View file

@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_st.hpp>
class SrsProtocol;
class ISrsProtocolReaderWriter;
class ISrsMessage;
class SrsCommonMessage;
class SrsCreateStreamPacket;
@ -115,9 +116,9 @@ class SrsRtmpClient
{
protected:
SrsProtocol* protocol;
st_netfd_t stfd;
ISrsProtocolReaderWriter* io;
public:
SrsRtmpClient(st_netfd_t _stfd);
SrsRtmpClient(ISrsProtocolReaderWriter* skt);
virtual ~SrsRtmpClient();
public:
virtual void set_recv_timeout(int64_t timeout_us);
@ -145,9 +146,9 @@ class SrsRtmp
{
private:
SrsProtocol* protocol;
st_netfd_t stfd;
ISrsProtocolReaderWriter* io;
public:
SrsRtmp(st_netfd_t client_stfd);
SrsRtmp(ISrsProtocolReaderWriter* skt);
virtual ~SrsRtmp();
public:
virtual SrsProtocol* get_protocol();