diff options
author | MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> | 2013-02-22 12:39:50 +0900 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-03-04 09:54:17 +0100 |
commit | bf1c852aa9cbe21beeb7c37d03e167c33ac196b2 (patch) | |
tree | d1cf6d722d272b1a42d98a8c5704a843e2bf0a9f /util/osdep.c | |
parent | 4ef7b8944cc5eae66159c60066b21466e2dc1ee4 (diff) | |
download | qemu-bf1c852aa9cbe21beeb7c37d03e167c33ac196b2.tar.gz qemu-bf1c852aa9cbe21beeb7c37d03e167c33ac196b2.tar.bz2 qemu-bf1c852aa9cbe21beeb7c37d03e167c33ac196b2.zip |
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>
Diffstat (limited to 'util/osdep.c')
-rw-r--r-- | util/osdep.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/osdep.c b/util/osdep.c index 5b51a0322e..c4082610df 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -63,6 +63,12 @@ int socket_set_cork(int fd, int v) #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) { |