aboutsummaryrefslogtreecommitdiff
path: root/src/luasocket.c
blob: d329d4e02b12a8bee61d25a49557ca72032fa09b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*=========================================================================*\
* Networking support for the Lua language
* Diego Nehab
* 26/11/1999
*
* This library is part of an  effort to progressively increase the network
* connectivity  of  the Lua  language.  The  Lua interface  to  networking
* functions follows the Sockets API  closely, trying to simplify all tasks
* involved in setting up both  client and server connections. The provided
* IO routines,  however, follow the Lua  style, being very similar  to the
* standard Lua read and write functions.
*
* RCS ID: $Id$
\*=========================================================================*/

/*=========================================================================*\
* Standard include files
\*=========================================================================*/
#include <lua.h>
#include <lauxlib.h>

/*=========================================================================*\
* LuaSocket includes
\*=========================================================================*/
#include "luasocket.h"
#include "lspriv.h"
#include "lsselect.h"
#include "lscompat.h"
#include "lsbase.h"
#include "lstm.h"
#include "lsbuf.h"
#include "lssock.h"
#include "lsinet.h"
#include "lstcpc.h"
#include "lstcps.h"
#include "lstcps.h"
#include "lsudp.h"

/*=========================================================================*\
* Exported functions
\*=========================================================================*/
/*-------------------------------------------------------------------------*\
* Initializes all library modules.
\*-------------------------------------------------------------------------*/
LUASOCKET_API int lua_socketlibopen(lua_State *L)
{
    priv_open(L);
    select_open(L);
    base_open(L);
    tm_open(L);
    compat_open(L);
    fd_open(L);
    sock_open(L);
    inet_open(L); 
    tcpc_open(L); 
    buf_open(L);
    tcps_open(L); 
    udp_open(L);
    return 1;
}