summaryrefslogtreecommitdiff
path: root/src/socket/usocket.h
diff options
context:
space:
mode:
authormniip <mniip@mniip.com>2013-05-02 18:41:01 (GMT)
committer mniip <mniip@mniip.com>2013-05-02 18:41:01 (GMT)
commite7b29ab9b5e037a8896c62f0473cae8d353d5114 (patch)
tree503fc881969e57cb521fbf551fcede513c1f12fe /src/socket/usocket.h
parent2eaed9c9d478292f18d8a6aea9d2c9c869b26911 (diff)
downloadpowder-e7b29ab9b5e037a8896c62f0473cae8d353d5114.zip
powder-e7b29ab9b5e037a8896c62f0473cae8d353d5114.tar.gz
statically linked, or better to say, builtin luasocket
Diffstat (limited to 'src/socket/usocket.h')
-rw-r--r--src/socket/usocket.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/socket/usocket.h b/src/socket/usocket.h
new file mode 100644
index 0000000..f2a89aa
--- /dev/null
+++ b/src/socket/usocket.h
@@ -0,0 +1,40 @@
+#ifndef USOCKET_H
+#define USOCKET_H
+/*=========================================================================*\
+* Socket compatibilization module for Unix
+* LuaSocket toolkit
+*
+* RCS ID: $Id: usocket.h,v 1.7 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+
+/*=========================================================================*\
+* 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>
+/* struct timeval */
+#include <sys/time.h>
+/* gethostbyname and gethostbyaddr functions */
+#include <netdb.h>
+/* sigpipe handling */
+#include <signal.h>
+/* IP stuff*/
+#include <netinet/in.h>
+#include <arpa/inet.h>
+/* TCP options (nagle algorithm disable) */
+#include <netinet/tcp.h>
+
+typedef int t_socket;
+typedef t_socket *p_socket;
+
+#define SOCKET_INVALID (-1)
+
+#endif /* USOCKET_H */