From 101f9cbc2b73340197ec610c095fd69f0b1413ed Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 23 Oct 2012 21:31:53 +0200 Subject: qemu-sockets: add socket_listen, socket_connect, socket_parse These are QAPI-friendly versions of the qemu-sockets functions. They support IP sockets, Unix sockets, and named file descriptors, using a QAPI union to dispatch to the correct function. Reviewed-by: Luiz Capitulino Signed-off-by: Paolo Bonzini --- qemu_socket.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qemu_socket.h') diff --git a/qemu_socket.h b/qemu_socket.h index 89a5feb7ec..02490ad06c 100644 --- a/qemu_socket.h +++ b/qemu_socket.h @@ -65,6 +65,11 @@ int unix_nonblocking_connect(const char *str, NonBlockingConnectHandler *callback, void *opaque, Error **errp); +SocketAddress *socket_parse(const char *str, Error **errp); +int socket_connect(SocketAddress *addr, Error **errp, + NonBlockingConnectHandler *callback, void *opaque); +int socket_listen(SocketAddress *addr, Error **errp); + /* Old, ipv4 only bits. Don't use for new code. */ int parse_host_port(struct sockaddr_in *saddr, const char *str); int socket_init(void); -- cgit v1.2.3