aboutsummaryrefslogtreecommitdiff
path: root/qemu_socket.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-03 13:37:46 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-23 13:54:55 +0200
commit1fc05adfa0f79a1268f7c2b7fb324f15eb63dceb (patch)
treec9da3e2020b45a2fd3292a4a63b3ad5a641ea6a3 /qemu_socket.h
parent0c814709471ac8a9617406e1e2cbd7015e97bfe9 (diff)
qemu-sockets: add nonblocking connect for Unix sockets
This patch mostly mimics what was done to TCP sockets, but simpler because there is only one address to try. It also includes a free EINTR bug fix. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu_socket.h')
-rw-r--r--qemu_socket.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/qemu_socket.h b/qemu_socket.h
index ff979b5cd6..89a5feb7ec 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -58,8 +58,12 @@ const char *inet_strfamily(int family);
int unix_listen_opts(QemuOpts *opts, Error **errp);
int unix_listen(const char *path, char *ostr, int olen, Error **errp);
-int unix_connect_opts(QemuOpts *opts, Error **errp);
+int unix_connect_opts(QemuOpts *opts, Error **errp,
+ NonBlockingConnectHandler *callback, void *opaque);
int unix_connect(const char *path, Error **errp);
+int unix_nonblocking_connect(const char *str,
+ NonBlockingConnectHandler *callback,
+ void *opaque, Error **errp);
/* Old, ipv4 only bits. Don't use for new code. */
int parse_host_port(struct sockaddr_in *saddr, const char *str);