diff options
| author | Anton <anton@picapica.im> | 2026-11-15 21:25:50 +0400 |
|---|---|---|
| committer | Anton <anton@picapica.im> | 2026-11-15 21:25:50 +0400 |
| commit | 0f9e20bdd1159b65013dcc27bf1a6fb30c5cb115 (patch) | |
| tree | 97f0e973ac7dd58b84f52af4a079568b1900d06f /PICA_node.h | |
| parent | bd0bc3949a8fed3a2bd87b39cbeecd0b5cfcafd1 (diff) | |
| download | pica-pica-0f9e20bdd1159b65013dcc27bf1a6fb30c5cb115.tar.gz pica-pica-0f9e20bdd1159b65013dcc27bf1a6fb30c5cb115.zip | |
proto update: add get my addr and get my UDP addr messages
Diffstat (limited to 'PICA_node.h')
| -rw-r--r-- | PICA_node.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/PICA_node.h b/PICA_node.h index 2dbb088..82ddb32 100644 --- a/PICA_node.h +++ b/PICA_node.h @@ -52,6 +52,7 @@ #include <time.h> #include "PICA_nodeaddrlist.h" #include "PICA_id.h" +#include "PICA_proto.h" #include <event2/event.h> @@ -142,6 +143,16 @@ struct client 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; + + //Pending "get my UDP address" request. The token is what ties a datagram + //arriving at the UDP socket to this connection, see process_udp_read() + unsigned char udpaddr_token[PICA_PROTO_MYUDPADDR_TOKENSIZE]; + int udpaddr_token_issued; + time_t udpaddr_token_tmst; + struct client *udpaddr_token_next;//next client in the same bucket of udpaddr_tokens[] + //how many more MYUDPADDRREQ messages are served right now, see client_udpaddr_req_allowed() + unsigned int udpaddr_req_allowance; + time_t udpaddr_req_tmst; }; struct cclink //структура, описывающая соединение двух клиентов между собой через сервер |
