use poll instead of select in ESL client lib because select is not your friend....

This commit is contained in:
Anthony Minessale committed 2011-03-26 10:59:55 -05:00
1 parent 608b9abd5a
commit ae595cd529
2 files changed
+168 -54

No files matched your search

+7
View File
@@ -46,6 +46,11 @@ extern "C" {
typedef struct esl_event_header esl_event_header_t;
typedef struct esl_event esl_event_t;
typedef enum {
ESL_POLL_READ = (1 << 0),
ESL_POLL_WRITE = (1 << 1),
ESL_POLL_ERROR = (1 << 2)
} esl_poll_t;
typedef enum {
ESL_EVENT_TYPE_PLAIN,
@@ -446,6 +451,8 @@ ESL_DECLARE(esl_status_t) esl_filter(esl_handle_t *handle, const char *header, c
*/
ESL_DECLARE(esl_status_t) esl_events(esl_handle_t *handle, esl_event_type_t etype, const char *value);
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags);
#define esl_recv(_h) esl_recv_event(_h, 0, NULL)
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, 0, NULL)