From 37845898cbf779c7d3b5664997d0db48968c929c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 1 Jun 2013 15:52:11 +0100 Subject: Rework socket creation logic to support both ipv4 and ipv6 sockets. --- src/util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/util.h') 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); /* -- cgit v1.2.3