diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/io/channel-socket.h | 4 | ||||
-rw-r--r-- | include/io/net-listener.h | 2 | ||||
-rw-r--r-- | include/qemu/sockets.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/include/io/channel-socket.h b/include/io/channel-socket.h index d7134d2cd6..777ff5954e 100644 --- a/include/io/channel-socket.h +++ b/include/io/channel-socket.h @@ -123,6 +123,7 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc, * qio_channel_socket_listen_sync: * @ioc: the socket channel object * @addr: the address to listen to + * @num: the expected ammount of connections * @errp: pointer to a NULL-initialized error object * * Attempt to listen to the address @addr. This method @@ -132,12 +133,14 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc, */ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, SocketAddress *addr, + int num, Error **errp); /** * qio_channel_socket_listen_async: * @ioc: the socket channel object * @addr: the address to listen to + * @num: the expected ammount of connections * @callback: the function to invoke on completion * @opaque: user data to pass to @callback * @destroy: the function to free @opaque @@ -153,6 +156,7 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, */ void qio_channel_socket_listen_async(QIOChannelSocket *ioc, SocketAddress *addr, + int num, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy, diff --git a/include/io/net-listener.h b/include/io/net-listener.h index 8081ac58a2..fb101703e3 100644 --- a/include/io/net-listener.h +++ b/include/io/net-listener.h @@ -95,6 +95,7 @@ void qio_net_listener_set_name(QIONetListener *listener, * qio_net_listener_open_sync: * @listener: the network listener object * @addr: the address to listen on + * @num: the amount of expected connections * @errp: pointer to a NULL initialized error object * * Synchronously open a listening connection on all @@ -104,6 +105,7 @@ void qio_net_listener_set_name(QIONetListener *listener, */ int qio_net_listener_open_sync(QIONetListener *listener, SocketAddress *addr, + int num, Error **errp); /** diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 8140fea685..57cd049d6e 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -41,7 +41,7 @@ int unix_connect(const char *path, Error **errp); SocketAddress *socket_parse(const char *str, Error **errp); int socket_connect(SocketAddress *addr, Error **errp); -int socket_listen(SocketAddress *addr, Error **errp); +int socket_listen(SocketAddress *addr, int num, Error **errp); void socket_listen_cleanup(int fd, Error **errp); int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp); |