aboutsummaryrefslogtreecommitdiffstats
path: root/sockets.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
commitc27f813900a3c114562efbb8df1065e94766fc48 (patch)
treed95919283707dcab61009e27007374a745c9541e /sockets.h
parent0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff)
downloadexternal_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'sockets.h')
-rw-r--r--sockets.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sockets.h b/sockets.h
index 7cdc693..274cf32 100644
--- a/sockets.h
+++ b/sockets.h
@@ -41,6 +41,9 @@
# ifndef EINPROGRESS
# define EINPROGRESS 10036
# endif
+# ifndef EALREADY
+# define EALREADY 10037
+# endif
# ifndef EDESTADDRREQ
# define EDESTADDRREQ 10039
# endif
@@ -212,6 +215,12 @@ const char* sock_address_to_string( const SockAddress* a );
/* return the port number of a given socket address, or -1 if it's a Unix one */
int sock_address_get_port( const SockAddress* a );
+/* set the port number of a given socket address, don't do anything for Unix ones */
+void sock_address_set_port( SockAddress* a, uint16_t port );
+
+/* return the path of a given Unix socket, returns NULL for non-Unix ones */
+const char* sock_address_get_path( const SockAddress* a );
+
/* return the inet address, or -1 if it's not SOCKET_INET */
int sock_address_get_ip( const SockAddress* a );
@@ -257,7 +266,7 @@ int socket_set_nonblock(int fd);
int socket_set_blocking(int fd);
/* disable the TCP Nagle algorithm for lower latency */
-int socket_set_lowlatency(int fd);
+int socket_set_nodelay(int fd);
/* send OOB data inline for this socket */
int socket_set_oobinline(int fd);