beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luasocket / src / tcp.h
blobeded620324d7bee6cb34d58b4399112dcdc1049c
1 #ifndef TCP_H
2 #define TCP_H
3 /*=========================================================================*\
4 * TCP object
5 * LuaSocket toolkit
7 * The tcp.h module is basicly a glue that puts together modules buffer.h,
8 * timeout.h socket.h and inet.h to provide the LuaSocket TCP (AF_INET,
9 * SOCK_STREAM) support.
11 * Three classes are defined: master, client and server. The master class is
12 * a newly created tcp object, that has not been bound or connected. Server
13 * objects are tcp objects bound to some local address. Client objects are
14 * tcp objects either connected to some address or returned by the accept
15 * method of a server object.
16 \*=========================================================================*/
17 #include "lua.h"
19 #include "buffer.h"
20 #include "timeout.h"
21 #include "socket.h"
23 typedef struct t_tcp_ {
24 t_socket sock;
25 t_io io;
26 t_buffer buf;
27 t_timeout tm;
28 int family;
29 } t_tcp;
31 typedef t_tcp *p_tcp;
33 int tcp_open(lua_State *L);
35 #endif /* TCP_H */