mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from 2.0
This commit is contained in:
commit
14760003ba
4 changed files with 87 additions and 15 deletions
|
@ -121,6 +121,14 @@ extern srs_rtmp_t srs_rtmp_create(const char* url);
|
|||
* @return a rtmp handler, or NULL if error occured.
|
||||
*/
|
||||
extern srs_rtmp_t srs_rtmp_create2(const char* url);
|
||||
/**
|
||||
* set socket timeout
|
||||
* @param recv_timeout_ms the timeout for receiving messages in ms.
|
||||
* @param send_timeout_ms the timeout for sending message in ms.
|
||||
*
|
||||
* @return 0, success; otherswise, failed.
|
||||
*/
|
||||
extern int srs_rtmp_set_timeout(srs_rtmp_t rtmp, int recv_timeout_ms, int send_timeout_ms);
|
||||
/**
|
||||
* close and destroy the rtmp stack.
|
||||
* @remark, user should never use the rtmp again.
|
||||
|
@ -1010,7 +1018,7 @@ typedef void* srs_hijack_io_t;
|
|||
* set the socket recv timeout.
|
||||
* @return 0, success; otherswise, failed.
|
||||
*/
|
||||
extern void srs_hijack_io_set_recv_timeout(srs_hijack_io_t ctx, int64_t timeout_us);
|
||||
extern int srs_hijack_io_set_recv_timeout(srs_hijack_io_t ctx, int64_t timeout_us);
|
||||
/**
|
||||
* get the socket recv timeout.
|
||||
* @return 0, success; otherswise, failed.
|
||||
|
@ -1025,7 +1033,7 @@ typedef void* srs_hijack_io_t;
|
|||
* set the socket send timeout.
|
||||
* @return 0, success; otherswise, failed.
|
||||
*/
|
||||
extern void srs_hijack_io_set_send_timeout(srs_hijack_io_t ctx, int64_t timeout_us);
|
||||
extern int srs_hijack_io_set_send_timeout(srs_hijack_io_t ctx, int64_t timeout_us);
|
||||
/**
|
||||
* get the socket send timeout.
|
||||
* @return 0, success; otherswise, failed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue