diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2009-03-22 04:22:33 +0100 |
---|---|---|
committer | Jakob Bornecrantz <wallbraker@gmail.com> | 2009-06-01 02:18:15 -0700 |
commit | aee1a6f70413235c0c4c2c2adfca97d5128a155e (patch) | |
tree | 869b2b32e91fa9dcc4f998bf4bf2923551107350 /src/gallium/auxiliary/util/u_network.h | |
parent | bedf7fa49f549541fde2e19d2fbb6b8fe57ec124 (diff) |
util: Add simple network functions
Diffstat (limited to 'src/gallium/auxiliary/util/u_network.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_network.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_network.h b/src/gallium/auxiliary/util/u_network.h new file mode 100644 index 0000000000..14d3884427 --- /dev/null +++ b/src/gallium/auxiliary/util/u_network.h @@ -0,0 +1,24 @@ + +#ifndef _U_NETWORK_H_ +#define _U_NETWORK_H_ + +#include "pipe/p_compiler.h" + +#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) +# define PIPE_HAVE_SOCKETS +#elif defined(PIPE_OS_LINUX) +# define PIPE_HAVE_SOCKETS +#endif + +boolean u_socket_init(void); +void u_socket_stop(void); +void u_socket_close(int s); +int u_socket_listen_on_port(uint16_t portnum); +int u_socket_accept(int s); +int u_socket_connect(const char *host, uint16_t port); +int u_socket_send(int s, void *data, size_t size); +int u_socket_peek(int s, void *data, size_t size); +int u_socket_recv(int s, void *data, size_t size); +void u_socket_block(int s, boolean block); + +#endif |