mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 05:51:53 -06:00
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>
This commit is contained in:
parent
0c81470947
commit
1fc05adfa0
3 changed files with 72 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue