aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-01-08 11:11:30 +0000
committerAmit Shah <amit.shah@redhat.com>2015-01-16 13:06:17 +0530
commite1a8c9b67fc97d293211773edcae9e8e2f3367ab (patch)
treebe5d5c5c0e26818e16489bb0d12f0d3fc7cca5a5 /include/qemu
parent8580b06498a5dffe554e7ac627726b1d7775c591 (diff)
downloadqemu-e1a8c9b67fc97d293211773edcae9e8e2f3367ab.zip
qemu-e1a8c9b67fc97d293211773edcae9e8e2f3367ab.tar.gz
qemu-e1a8c9b67fc97d293211773edcae9e8e2f3367ab.tar.bz2
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 <dgilbert@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/sockets.h7
1 files changed, 7 insertions, 0 deletions
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
*/