aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_network.h
blob: be1fa00dcb4745c60e131c9597c1a938a9ecc0db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

#ifndef _U_NETWORK_H_
#define _U_NETWORK_H_

#include "pipe/p_compiler.h"

#if defined(PIPE_OS_WINDOWS) || defined(PIPE_OS_UNIX)
#  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