diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-01 15:52:11 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-01 15:52:11 +0100 |
commit | 37845898cbf779c7d3b5664997d0db48968c929c (patch) | |
tree | a190b5ee9d152ba60135136bbe8108d7da81166c /src/util.h | |
parent | 8cc2aee8859731ee2fe280070423f79e7d009ca3 (diff) | |
download | rspamd-37845898cbf779c7d3b5664997d0db48968c929c.tar.gz rspamd-37845898cbf779c7d3b5664997d0db48968c929c.zip |
Rework socket creation logic to support both ipv4 and ipv6 sockets.
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h index 3dfa851bc..6d0bdc098 100644 --- a/src/util.h +++ b/src/util.h @@ -29,17 +29,18 @@ gint accept_from_socket (gint listen_sock, struct sockaddr *addr, socklen_t *len /* * Create and bind or connect unix socket */ -gint make_unix_socket (const gchar *, struct sockaddr_un *, gboolean is_server, gboolean async); +gint make_unix_socket (const gchar *, struct sockaddr_un *, gint type, gboolean is_server, gboolean async); /** * Make universal stream socket * @param credits host, ip or path to unix socket * @param port port (used for network sockets) + * @param type type of socket (SO_STREAM or SO_DGRAM) * @param async make this socket asynced * @param is_server make this socket as server socket * @param try_resolve try name resolution for a socket (BLOCKING) */ -gint make_universal_stream_socket (const gchar *credits, guint16 port, +gint make_universal_socket (const gchar *credits, guint16 port, gint type, gboolean async, gboolean is_server, gboolean try_resolve); /* |