Introducing connection state io_read_handler.

This commit is contained in:
Igor Sysoev
2018-04-11 17:33:18 +03:00
parent 0be4f1f693
commit c7e575d5c6
3 changed files with 45 additions and 52 deletions

View File

@@ -8,6 +8,7 @@
#define _NXT_CONN_H_INCLUDED_
typedef ssize_t (*nxt_conn_io_read_t)(nxt_conn_t *c);
typedef nxt_msec_t (*nxt_conn_timer_value_t)(nxt_conn_t *c, uintptr_t data);
@@ -16,6 +17,8 @@ typedef struct {
nxt_work_handler_t close_handler;
nxt_work_handler_t error_handler;
nxt_conn_io_read_t io_read_handler;
nxt_work_handler_t timer_handler;
nxt_conn_timer_value_t timer_value;
uintptr_t timer_data;
@@ -160,7 +163,6 @@ struct nxt_conn_s {
nxt_sockaddr_t *local;
const char *action;
uint8_t peek;
uint8_t blocked; /* 1 bit */
uint8_t delayed; /* 1 bit */