diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-22 17:37:41 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-22 17:37:41 -0800 |
commit | 70a2e1db1dd4e4aa0c01e2dfb50499123d69967c (patch) | |
tree | ffe20a9284cfa95918a9995fcb74c36afe7ffece /src/luasec/luasocket/buffer.h | |
parent | fe9708fd29d8def5245ba300b671824f23d429e4 (diff) | |
download | teliva-70a2e1db1dd4e4aa0c01e2dfb50499123d69967c.tar.gz |
delete most of the embedded luasocket in luasec
Hilariously, I wasn't linking against it in the first place.
Diffstat (limited to 'src/luasec/luasocket/buffer.h')
-rw-r--r-- | src/luasec/luasocket/buffer.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/luasec/luasocket/buffer.h b/src/luasec/luasocket/buffer.h deleted file mode 100644 index a9cbd3a..0000000 --- a/src/luasec/luasocket/buffer.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef BUF_H -#define BUF_H -/*=========================================================================*\ -* Input/Output interface for Lua programs -* LuaSocket toolkit -* -* Line patterns require buffering. Reading one character at a time involves -* too many system calls and is very slow. This module implements the -* LuaSocket interface for input/output on connected objects, as seen by -* Lua programs. -* -* Input is buffered. Output is *not* buffered because there was no simple -* way of making sure the buffered output data would ever be sent. -* -* The module is built on top of the I/O abstraction defined in io.h and the -* timeout management is done with the timeout.h interface. -\*=========================================================================*/ -#include "../../lua.h" - -#include "io.h" -#include "timeout.h" - -/* buffer size in bytes */ -#define BUF_SIZE 8192 - -/* buffer control structure */ -typedef struct t_buffer_ { - double birthday; /* throttle support info: creation time, */ - size_t sent, received; /* bytes sent, and bytes received */ - p_io io; /* IO driver used for this buffer */ - p_timeout tm; /* timeout management for this buffer */ - size_t first, last; /* index of first and last bytes of stored data */ - char data[BUF_SIZE]; /* storage space for buffer data */ -} t_buffer; -typedef t_buffer *p_buffer; - -int buffer_open(lua_State *L); -void buffer_init(p_buffer buf, p_io io, p_timeout tm); -int buffer_meth_send(lua_State *L, p_buffer buf); -int buffer_meth_receive(lua_State *L, p_buffer buf); -int buffer_meth_getstats(lua_State *L, p_buffer buf); -int buffer_meth_setstats(lua_State *L, p_buffer buf); -int buffer_isempty(p_buffer buf); - -#endif /* BUF_H */ |