Mercurial > luasocket
comparison src/tcp.h @ 0:4b915342e2a8
LuaSocket 2.0.2 + CMake build description.
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Tue, 26 Aug 2008 18:40:01 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4b915342e2a8 |
---|---|
1 #ifndef TCP_H | |
2 #define TCP_H | |
3 /*=========================================================================*\ | |
4 * TCP object | |
5 * LuaSocket toolkit | |
6 * | |
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. | |
10 * | |
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 * RCS ID: $Id: tcp.h,v 1.7 2005/10/07 04:40:59 diego Exp $ | |
18 \*=========================================================================*/ | |
19 #include "lua.h" | |
20 | |
21 #include "buffer.h" | |
22 #include "timeout.h" | |
23 #include "socket.h" | |
24 | |
25 typedef struct t_tcp_ { | |
26 t_socket sock; | |
27 t_io io; | |
28 t_buffer buf; | |
29 t_timeout tm; | |
30 } t_tcp; | |
31 | |
32 typedef t_tcp *p_tcp; | |
33 | |
34 int tcp_open(lua_State *L); | |
35 | |
36 #endif /* TCP_H */ |