commit | bf1c852aa9cbe21beeb7c37d03e167c33ac196b2 | [log] [tgz] |
---|---|---|
author | MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> | Fri Feb 22 12:39:50 2013 +0900 |
committer | Stefan Hajnoczi <stefanha@redhat.com> | Mon Mar 04 09:54:17 2013 +0100 |
tree | d1cf6d722d272b1a42d98a8c5704a843e2bf0a9f | |
parent | 4ef7b8944cc5eae66159c60066b21466e2dc1ee4 [diff] [blame] |
move socket_set_nodelay to osdep.c Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/util/osdep.c b/util/osdep.c index 5b51a03..c408261 100644 --- a/util/osdep.c +++ b/util/osdep.c
@@ -63,6 +63,12 @@ #endif } +int socket_set_nodelay(int fd) +{ + int v = 1; + return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &v, sizeof(v)); +} + int qemu_madvise(void *addr, size_t len, int advice) { if (advice == QEMU_MADV_INVALID) {