mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the timeout for librtmp
This commit is contained in:
parent
3fbe9d2442
commit
e00928557e
4 changed files with 86 additions and 14 deletions
|
@ -107,6 +107,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.
|
||||
|
@ -982,7 +990,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.
|
||||
|
@ -997,7 +1005,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