luasocket/src/usocket.h

44 lines
1.1 KiB
C
Raw Normal View History

#ifndef USOCKET_H
#define USOCKET_H
2003-03-28 22:08:50 +01:00
/*=========================================================================*\
2003-05-25 03:54:13 +02:00
* Socket compatibilization module for Unix
* LuaSocket toolkit
2003-03-28 22:08:50 +01:00
\*=========================================================================*/
2002-07-08 22:14:09 +02:00
/*=========================================================================*\
* BSD include files
\*=========================================================================*/
/* error codes */
#include <errno.h>
/* close function */
#include <unistd.h>
/* fnctnl function and associated constants */
#include <fcntl.h>
/* struct sockaddr */
#include <sys/types.h>
/* socket function */
#include <sys/socket.h>
2004-07-01 05:32:09 +02:00
/* struct timeval */
#include <sys/time.h>
2002-07-08 22:14:09 +02:00
/* gethostbyname and gethostbyaddr functions */
#include <netdb.h>
/* sigpipe handling */
#include <signal.h>
2003-03-21 02:07:23 +01:00
/* IP stuff*/
2002-07-08 22:14:09 +02:00
#include <netinet/in.h>
#include <arpa/inet.h>
/* TCP options (nagle algorithm disable) */
#include <netinet/tcp.h>
2002-07-08 22:14:09 +02:00
2009-05-27 11:31:38 +02:00
#ifndef SO_REUSEPORT
#define SO_REUSEPORT SO_REUSEADDR
#endif
2005-10-07 06:40:59 +02:00
typedef int t_socket;
typedef t_socket *p_socket;
typedef struct sockaddr_storage t_sockaddr_storage;
2002-07-08 22:14:09 +02:00
2005-10-07 06:40:59 +02:00
#define SOCKET_INVALID (-1)
2002-07-08 22:14:09 +02:00
#endif /* USOCKET_H */