mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
add switch_socket_waitlist for waiting on multiple sockets and abstract it to poll and select so windows can use it too
This commit is contained in:
@@ -2398,6 +2398,13 @@ typedef enum {
|
||||
SWITCH_POLL_INVALID = (1 << 7)
|
||||
} switch_poll_t;
|
||||
|
||||
typedef struct switch_waitlist_s {
|
||||
switch_os_socket_t sock;
|
||||
uint32_t events;
|
||||
uint32_t revents;
|
||||
} switch_waitlist_t;
|
||||
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
@@ -1067,6 +1067,8 @@ SWITCH_DECLARE(unsigned long) switch_atoul(const char *nptr);
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_strerror_r(int errnum, char *buf, switch_size_t buflen);
|
||||
SWITCH_DECLARE(int) switch_wait_sock(switch_os_socket_t sock, uint32_t ms, switch_poll_t flags);
|
||||
SWITCH_DECLARE(int) switch_wait_socklist(switch_waitlist_t *waitlist, uint32_t len, uint32_t ms);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
Reference in New Issue
Block a user