Add uasync socket polling for ETCP packet reception
This commit is contained in:
1 parent
223e26fdf7
commit
c08e73b6d7
1 file changed
+7
@@ -15,6 +15,8 @@
|
||||
#include <stdlib.h>
|
||||
static void etcp_connections_read_callback(int fd, void* arg);
|
||||
|
||||
static void etcp_connections_read_callback(int fd, void* arg);
|
||||
|
||||
#include <time.h>
|
||||
|
||||
// Simple debug macros to replace missing debug_config.h
|
||||
@@ -262,6 +264,11 @@ struct ETCP_SOCKET* etcp_socket_add(struct UTUN_INSTANCE* instance, struct socka
|
||||
e_sock->instance = instance;
|
||||
e_sock->errorcode = 0;
|
||||
e_sock->pkt_format_errors = 0;
|
||||
e_sock->socket_id = uasync_add_socket(instance->ua, e_sock->fd,
|
||||
etcp_connections_read_callback,
|
||||
NULL, NULL, e_sock);
|
||||
printf("[SOCKET] Registered ETCP socket fd=%d with callback %p
|
||||
", e_sock->fd, etcp_connections_read_callback);
|
||||
|
||||
// Add to instance's socket list
|
||||
e_sock->next = instance->etcp_sockets;
|
||||
|
||||
Reference in new issue
Block a user