mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-15 21:39:51 +02:00
Finished implementation of LuaSocket 2.0 alpha on Linux.
Some testing still needed.
This commit is contained in:
23
src/inet.h
23
src/inet.h
@ -1,25 +1,30 @@
|
||||
#ifndef INET_H
|
||||
#define INET_H
|
||||
/*=========================================================================*\
|
||||
* Internet domain functions
|
||||
* LuaSocket toolkit
|
||||
*
|
||||
* This module implements the creation and connection of internet domain
|
||||
* sockets, on top of the socket.h interface, and the interface of with the
|
||||
* resolver.
|
||||
*
|
||||
* The function inet_aton is provided for the platforms where it is not
|
||||
* available. The module also implements the interface of the internet
|
||||
* getpeername and getsockname functions as seen by Lua programs.
|
||||
*
|
||||
* The Lua functions toip and tohostname are also implemented here.
|
||||
*
|
||||
* RCS ID: $Id$
|
||||
\*=========================================================================*/
|
||||
#ifndef INET_H
|
||||
#define INET_H
|
||||
|
||||
#include <lua.h>
|
||||
#include "socket.h"
|
||||
|
||||
/*-------------------------------------------------------------------------*\
|
||||
* Exported functions
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void inet_open(lua_State *L);
|
||||
|
||||
const char *inet_tryconnect(p_sock ps, const char *address,
|
||||
unsigned short port);
|
||||
const char *inet_trybind(p_sock ps, const char *address,
|
||||
unsigned short port, int backlog);
|
||||
const char *inet_trycreate(p_sock ps, int type);
|
||||
|
||||
int inet_meth_getpeername(lua_State *L, p_sock ps);
|
||||
int inet_meth_getsockname(lua_State *L, p_sock ps);
|
||||
|
||||
@ -27,4 +32,4 @@ int inet_meth_getsockname(lua_State *L, p_sock ps);
|
||||
int inet_aton(const char *cp, struct in_addr *inp);
|
||||
#endif
|
||||
|
||||
#endif /* INET_H_ */
|
||||
#endif /* INET_H */
|
||||
|
Reference in New Issue
Block a user