diff options
| author | Anton <anton@picapica> | 2019-03-13 02:31:48 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2019-03-13 02:31:48 +0400 |
| commit | daa60475ed2e92b9afd89b1c4e32bbeda2c26315 (patch) | |
| tree | 55b6ddd2186f03f3d728e7b808b9efc609026614 /PICA_node.h | |
| parent | 4702db6fe153e002f17ff19c6cfab9e50bd653da (diff) | |
| download | pica-pica-daa60475ed2e92b9afd89b1c4e32bbeda2c26315.tar.gz pica-pica-daa60475ed2e92b9afd89b1c4e32bbeda2c26315.zip | |
pica-node: moved to libevent usage instead of select()
Diffstat (limited to 'PICA_node.h')
| -rw-r--r-- | PICA_node.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/PICA_node.h b/PICA_node.h index a82faea..3783efa 100644 --- a/PICA_node.h +++ b/PICA_node.h @@ -53,6 +53,7 @@ #include "PICA_nodeaddrlist.h" #include "PICA_id.h" +#include <event2/event.h> #define PICA_COMM_PORT 51914 //#define PICA_DATA_PORT 51915 @@ -130,6 +131,8 @@ struct client time_t tmst; int disconnect_ticking;//on sending message TO client this var is set to 1, on receiving some message FROM client this var is reset to 0 + struct event *ev_read; + struct event *ev_write; }; struct cclink //структура, описывающая соединение двух клиентов между собой через сервер @@ -161,6 +164,10 @@ struct cclink //структура, описывающая соединение struct cclink *prev; int disconnect_ticking; + struct event *ev_read_p1; + struct event *ev_read_p2; + struct event *ev_write_p1; + struct event *ev_write_p2; }; enum newconn_type @@ -186,6 +193,7 @@ struct newconn //структура, описывающая новое подкÐ struct client *cl; struct cclink *cc; } iconn; + struct event *ev; }; struct nodelink @@ -210,6 +218,8 @@ struct nodelink time_t tmst; int disconnect_ticking; + struct event *ev_read; + struct event *ev_write; }; extern SSL_CTX *anon_ctx; |
