summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authorAnsa89 <ansalonistefano@gmail.com>2016-12-16 11:56:51 +0100
committerAnsa89 <ansalonistefano@gmail.com>2017-04-01 17:47:34 +0200
commit5ff099763b1f56414572e1c12eb2f003117db5a0 (patch)
tree300a850c82970ec9462fa43d346a3e7f799de186 /toxcore/network.h
parent200ee1cace2f17537e6982ac447ea65d7c7a00b3 (diff)
Implement tox_loop
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index 28795602..4f27a81d 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -33,6 +33,11 @@
33#include "ccompat.h" 33#include "ccompat.h"
34#include "logger.h" 34#include "logger.h"
35 35
36#ifdef HAVE_LIBEV
37#include <ev.h>
38#elif HAVE_LIBEVENT
39#include <event2/event.h>
40#endif
36#include <stdint.h> 41#include <stdint.h>
37#include <stdio.h> 42#include <stdio.h>
38#include <stdlib.h> 43#include <stdlib.h>
@@ -316,6 +321,14 @@ typedef struct {
316 uint16_t port; 321 uint16_t port;
317 /* Our UDP socket. */ 322 /* Our UDP socket. */
318 Socket sock; 323 Socket sock;
324#ifdef HAVE_LIBEV
325 struct {
326 ev_io listener;
327 struct ev_loop *dispatcher;
328 } sock_listener;
329#elif HAVE_LIBEVENT
330 struct event *sock_listener;
331#endif
319} Networking_Core; 332} Networking_Core;
320 333
321/* Run this before creating sockets. 334/* Run this before creating sockets.