AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
socket.h
Go to the documentation of this file.
1 
5 #ifndef __SOCKET_H_
6 #define __SOCKET_H_
7 #include <sys/socket.h> // for recv, send
8 
10 #define SOCKET_ERROR -1
11 
13 typedef int socket_t;
14 
20 socket_t open_socket(const char* ip, short port);
21 
23 socket_t open_socket_nodelay(const char* ip, short port);
24 
26 socket_t open_socket_reuseaddr(const char* ip, short port);
27 #endif
int socket_t
Alias to differenciate between regular ints and socket fds.
Definition: socket.h:13
socket_t open_socket_nodelay(const char *ip, short port)
Open a socket with TCP_NODELAY.
Definition: socket.c:34
socket_t open_socket(const char *ip, short port)
Connect to a host:port couple.
Definition: socket.c:29
socket_t open_socket_reuseaddr(const char *ip, short port)
Open a socket with SO_REUSEADDR.
Definition: socket.c:39