summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-20 02:48:25 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-20 02:48:25 +0200
commitab4ca17ba3dfc92932834b09afc83cf7fe002a14 (patch)
treeddaad23777006ce39a3fda055fad7efe5cd09289 /src/fastd.h
parent8c705b9cd4c7866227f09af2a859744e47602ba4 (diff)
downloadfastd-ab4ca17ba3dfc92932834b09afc83cf7fe002a14.tar
fastd-ab4ca17ba3dfc92932834b09afc83cf7fe002a14.zip
Linux: use epoll to handle great numbers of peers with less overhead
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fastd.h b/src/fastd.h
index 8fcd247..f1ae2d3 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -241,10 +241,14 @@ struct fastd_context {
fastd_peer_group_t *peer_group;
VECTOR(fastd_peer_t*) peers;
- VECTOR(struct pollfd) pollfds;
-
VECTOR(fastd_peer_t*) peers_temp;
+#ifdef USE_EPOLL
+ int epoll_fd;
+#else
+ VECTOR(struct pollfd) pollfds;
+#endif
+
uint32_t peer_addr_ht_seed;
VECTOR(fastd_peer_t*) *peer_addr_ht;