summaryrefslogtreecommitdiffstats
path: root/src/rspamd.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-14 12:39:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-14 12:39:56 +0100
commit8fd0795feffdde4dd3a9f2fbe8c6ba517be370bf (patch)
treef03452c979e1f630137d83340fbfb1a6d185c5fb /src/rspamd.h
parent1453b09a9885edc0a8aa99d728c01bc96db5bb86 (diff)
downloadrspamd-8fd0795feffdde4dd3a9f2fbe8c6ba517be370bf.tar.gz
rspamd-8fd0795feffdde4dd3a9f2fbe8c6ba517be370bf.zip
[Feature] Rework listening system to allow multiple socket types per worker
Diffstat (limited to 'src/rspamd.h')
-rw-r--r--src/rspamd.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rspamd.h b/src/rspamd.h
index bd4ca9684..c0c60185d 100644
--- a/src/rspamd.h
+++ b/src/rspamd.h
@@ -165,12 +165,24 @@ enum rspamd_worker_flags {
RSPAMD_WORKER_ALWAYS_START = (1 << 4),
};
+enum rspamd_worker_socket_type {
+ RSPAMD_WORKER_SOCKET_NONE = 0,
+ RSPAMD_WORKER_SOCKET_TCP = (1 << 0),
+ RSPAMD_WORKER_SOCKET_UDP = (1 << 1),
+};
+
+struct rspamd_worker_listen_socket {
+ const rspamd_inet_addr_t *addr;
+ gint fd;
+ enum rspamd_worker_socket_type type;
+};
+
typedef struct worker_s {
const gchar *name;
gpointer (*worker_init_func)(struct rspamd_config *cfg);
void (*worker_start_func)(struct rspamd_worker *worker);
enum rspamd_worker_flags flags;
- gint listen_type;
+ enum rspamd_worker_socket_type listen_type;
guint worker_version;
guint64 rspamd_version;
const gchar *rspamd_features;