aboutsummaryrefslogtreecommitdiff
path: root/src/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp.c')
-rw-r--r--src/udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/udp.c b/src/udp.c
index b772b2e..6647711 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -30,7 +30,7 @@ static int meth_setsockname(lua_State *L);
30static int meth_setpeername(lua_State *L); 30static int meth_setpeername(lua_State *L);
31static int meth_close(lua_State *L); 31static int meth_close(lua_State *L);
32static int meth_setoption(lua_State *L); 32static int meth_setoption(lua_State *L);
33static int meth_timeout(lua_State *L); 33static int meth_settimeout(lua_State *L);
34static int meth_fd(lua_State *L); 34static int meth_fd(lua_State *L);
35static int meth_dirty(lua_State *L); 35static int meth_dirty(lua_State *L);
36static int opt_dontroute(lua_State *L); 36static int opt_dontroute(lua_State *L);
@@ -46,7 +46,7 @@ static luaL_reg udp[] = {
46 {"sendto", meth_sendto}, 46 {"sendto", meth_sendto},
47 {"receive", meth_receive}, 47 {"receive", meth_receive},
48 {"receivefrom", meth_receivefrom}, 48 {"receivefrom", meth_receivefrom},
49 {"timeout", meth_timeout}, 49 {"settimeout", meth_settimeout},
50 {"close", meth_close}, 50 {"close", meth_close},
51 {"setoption", meth_setoption}, 51 {"setoption", meth_setoption},
52 {"__gc", meth_close}, 52 {"__gc", meth_close},
@@ -252,10 +252,10 @@ static int opt_broadcast(lua_State *L)
252/*-------------------------------------------------------------------------*\ 252/*-------------------------------------------------------------------------*\
253* Just call tm methods 253* Just call tm methods
254\*-------------------------------------------------------------------------*/ 254\*-------------------------------------------------------------------------*/
255static int meth_timeout(lua_State *L) 255static int meth_settimeout(lua_State *L)
256{ 256{
257 p_udp udp = (p_udp) aux_checkgroup(L, "udp{any}", 1); 257 p_udp udp = (p_udp) aux_checkgroup(L, "udp{any}", 1);
258 return tm_meth_timeout(L, &udp->tm); 258 return tm_meth_settimeout(L, &udp->tm);
259} 259}
260 260
261/*-------------------------------------------------------------------------*\ 261/*-------------------------------------------------------------------------*\
@@ -297,7 +297,7 @@ static int meth_close(lua_State *L)
297\*-------------------------------------------------------------------------*/ 297\*-------------------------------------------------------------------------*/
298static int meth_setsockname(lua_State *L) 298static int meth_setsockname(lua_State *L)
299{ 299{
300 p_udp udp = (p_udp) aux_checkclass(L, "udp{master}", 1); 300 p_udp udp = (p_udp) aux_checkclass(L, "udp{unconnected}", 1);
301 const char *address = luaL_checkstring(L, 2); 301 const char *address = luaL_checkstring(L, 2);
302 unsigned short port = (unsigned short) luaL_checknumber(L, 3); 302 unsigned short port = (unsigned short) luaL_checknumber(L, 3);
303 const char *err = inet_trybind(&udp->sock, address, port, -1); 303 const char *err = inet_trybind(&udp->sock, address, port, -1);