diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-06-26 18:47:49 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-06-26 18:47:49 +0000 |
commit | 71f6bb60bf2b7457091c7106190f92ab7e51f7c6 (patch) | |
tree | 8ad3668667bd3da3c34f7ff7ae0a9a7a4daa4679 /src/socket.h | |
parent | f330540576031528f0daac231c61d4dd06e8ba1e (diff) | |
download | luasocket-71f6bb60bf2b7457091c7106190f92ab7e51f7c6.tar.gz luasocket-71f6bb60bf2b7457091c7106190f92ab7e51f7c6.tar.bz2 luasocket-71f6bb60bf2b7457091c7106190f92ab7e51f7c6.zip |
Finished implementation of LuaSocket 2.0 alpha on Linux.
Some testing still needed.
Diffstat (limited to 'src/socket.h')
-rw-r--r-- | src/socket.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/socket.h b/src/socket.h index 70ebc52..c7db5f2 100644 --- a/src/socket.h +++ b/src/socket.h | |||
@@ -1,11 +1,16 @@ | |||
1 | #ifndef SOCK_H | ||
2 | #define SOCK_H | ||
1 | /*=========================================================================*\ | 3 | /*=========================================================================*\ |
2 | * Socket compatibilization module | 4 | * Socket compatibilization module |
5 | * LuaSocket toolkit | ||
6 | * | ||
7 | * BSD Sockets and WinSock are similar, but there are a few irritating | ||
8 | * differences. Also, not all *nix platforms behave the same. This module | ||
9 | * (and the associated usocket.h and wsocket.h) factor these differences and | ||
10 | * creates a interface compatible with the io.h module. | ||
3 | * | 11 | * |
4 | * RCS ID: $Id$ | 12 | * RCS ID: $Id$ |
5 | \*=========================================================================*/ | 13 | \*=========================================================================*/ |
6 | #ifndef SOCK_H | ||
7 | #define SOCK_H | ||
8 | |||
9 | #include "io.h" | 14 | #include "io.h" |
10 | 15 | ||
11 | /*=========================================================================*\ | 16 | /*=========================================================================*\ |
@@ -32,7 +37,6 @@ int sock_accept(p_sock ps, p_sock pa, SA *addr, socklen_t *addr_len, | |||
32 | const char *sock_connect(p_sock ps, SA *addr, socklen_t addr_len); | 37 | const char *sock_connect(p_sock ps, SA *addr, socklen_t addr_len); |
33 | const char *sock_bind(p_sock ps, SA *addr, socklen_t addr_len); | 38 | const char *sock_bind(p_sock ps, SA *addr, socklen_t addr_len); |
34 | void sock_listen(p_sock ps, int backlog); | 39 | void sock_listen(p_sock ps, int backlog); |
35 | |||
36 | int sock_send(p_sock ps, const char *data, size_t count, | 40 | int sock_send(p_sock ps, const char *data, size_t count, |
37 | size_t *sent, int timeout); | 41 | size_t *sent, int timeout); |
38 | int sock_recv(p_sock ps, char *data, size_t count, | 42 | int sock_recv(p_sock ps, char *data, size_t count, |
@@ -41,11 +45,8 @@ int sock_sendto(p_sock ps, const char *data, size_t count, | |||
41 | size_t *sent, SA *addr, socklen_t addr_len, int timeout); | 45 | size_t *sent, SA *addr, socklen_t addr_len, int timeout); |
42 | int sock_recvfrom(p_sock ps, char *data, size_t count, | 46 | int sock_recvfrom(p_sock ps, char *data, size_t count, |
43 | size_t *got, SA *addr, socklen_t *addr_len, int timeout); | 47 | size_t *got, SA *addr, socklen_t *addr_len, int timeout); |
44 | |||
45 | void sock_setnonblocking(p_sock ps); | 48 | void sock_setnonblocking(p_sock ps); |
46 | void sock_setblocking(p_sock ps); | 49 | void sock_setblocking(p_sock ps); |
47 | void sock_setreuseaddr(p_sock ps); | ||
48 | |||
49 | const char *sock_hoststrerror(void); | 50 | const char *sock_hoststrerror(void); |
50 | const char *sock_createstrerror(void); | 51 | const char *sock_createstrerror(void); |
51 | const char *sock_bindstrerror(void); | 52 | const char *sock_bindstrerror(void); |