From e1a8c9b67fc97d293211773edcae9e8e2f3367ab Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 8 Jan 2015 11:11:30 +0000 Subject: socket shutdown Add QEMUFile interface to allow a socket to be 'shut down' - i.e. any reads/writes will fail (and any blocking read/write will be woken). Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Paolo Bonzini Reviewed-by: Amit Shah Signed-off-by: Amit Shah --- include/qemu/sockets.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/qemu/sockets.h') diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index f47dae6..7992ece 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -44,6 +44,13 @@ int socket_set_fast_reuse(int fd); int send_all(int fd, const void *buf, int len1); int recv_all(int fd, void *buf, int len1, bool single_read); +#ifdef WIN32 +/* Windows has different names for the same constants with the same values */ +#define SHUT_RD 0 +#define SHUT_WR 1 +#define SHUT_RDWR 2 +#endif + /* callback function for nonblocking connect * valid fd on success, negative error code on failure */ -- cgit v1.1