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:
15
src/socket.h
15
src/socket.h
@ -1,11 +1,16 @@
|
||||
#ifndef SOCK_H
|
||||
#define SOCK_H
|
||||
/*=========================================================================*\
|
||||
* Socket compatibilization module
|
||||
* LuaSocket toolkit
|
||||
*
|
||||
* BSD Sockets and WinSock are similar, but there are a few irritating
|
||||
* differences. Also, not all *nix platforms behave the same. This module
|
||||
* (and the associated usocket.h and wsocket.h) factor these differences and
|
||||
* creates a interface compatible with the io.h module.
|
||||
*
|
||||
* RCS ID: $Id$
|
||||
\*=========================================================================*/
|
||||
#ifndef SOCK_H
|
||||
#define SOCK_H
|
||||
|
||||
#include "io.h"
|
||||
|
||||
/*=========================================================================*\
|
||||
@ -32,7 +37,6 @@ int sock_accept(p_sock ps, p_sock pa, SA *addr, socklen_t *addr_len,
|
||||
const char *sock_connect(p_sock ps, SA *addr, socklen_t addr_len);
|
||||
const char *sock_bind(p_sock ps, SA *addr, socklen_t addr_len);
|
||||
void sock_listen(p_sock ps, int backlog);
|
||||
|
||||
int sock_send(p_sock ps, const char *data, size_t count,
|
||||
size_t *sent, int timeout);
|
||||
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,
|
||||
size_t *sent, SA *addr, socklen_t addr_len, int timeout);
|
||||
int sock_recvfrom(p_sock ps, char *data, size_t count,
|
||||
size_t *got, SA *addr, socklen_t *addr_len, int timeout);
|
||||
|
||||
void sock_setnonblocking(p_sock ps);
|
||||
void sock_setblocking(p_sock ps);
|
||||
void sock_setreuseaddr(p_sock ps);
|
||||
|
||||
const char *sock_hoststrerror(void);
|
||||
const char *sock_createstrerror(void);
|
||||
const char *sock_bindstrerror(void);
|
||||
|
Reference in New Issue
Block a user