aboutsummaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-10-07 04:40:59 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-10-07 04:40:59 +0000
commitf4dadea763c1959a27dead24df3ee6c54c209842 (patch)
treec13b294a8ca5438d59b60e3f5a25a4f7c1fc9a1b /src/buffer.h
parent562d8cceb704a96a7b2f9acc4bc229ab9f5c6541 (diff)
downloadluasocket-f4dadea763c1959a27dead24df3ee6c54c209842.tar.gz
luasocket-f4dadea763c1959a27dead24df3ee6c54c209842.tar.bz2
luasocket-f4dadea763c1959a27dead24df3ee6c54c209842.zip
Before compiling on Windows.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/buffer.h b/src/buffer.h
index f43e676..0a4a335 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -26,22 +26,22 @@
26#define BUF_SIZE 8192 26#define BUF_SIZE 8192
27 27
28/* buffer control structure */ 28/* buffer control structure */
29typedef struct t_buf_ { 29typedef struct t_buffer_ {
30 double birthday; /* throttle support info: creation time, */ 30 double birthday; /* throttle support info: creation time, */
31 size_t sent, received; /* bytes sent, and bytes received */ 31 size_t sent, received; /* bytes sent, and bytes received */
32 p_io io; /* IO driver used for this buffer */ 32 p_io io; /* IO driver used for this buffer */
33 p_tm tm; /* timeout management for this buffer */ 33 p_timeout tm; /* timeout management for this buffer */
34 size_t first, last; /* index of first and last bytes of stored data */ 34 size_t first, last; /* index of first and last bytes of stored data */
35 char data[BUF_SIZE]; /* storage space for buffer data */ 35 char data[BUF_SIZE]; /* storage space for buffer data */
36} t_buf; 36} t_buffer;
37typedef t_buf *p_buf; 37typedef t_buffer *p_buffer;
38 38
39int buf_open(lua_State *L); 39int buffer_open(lua_State *L);
40void buf_init(p_buf buf, p_io io, p_tm tm); 40void buffer_init(p_buffer buf, p_io io, p_timeout tm);
41int buf_meth_send(lua_State *L, p_buf buf); 41int buffer_meth_send(lua_State *L, p_buffer buf);
42int buf_meth_receive(lua_State *L, p_buf buf); 42int buffer_meth_receive(lua_State *L, p_buffer buf);
43int buf_meth_getstats(lua_State *L, p_buf buf); 43int buffer_meth_getstats(lua_State *L, p_buffer buf);
44int buf_meth_setstats(lua_State *L, p_buf buf); 44int buffer_meth_setstats(lua_State *L, p_buffer buf);
45int buf_isempty(p_buf buf); 45int buffer_isempty(p_buffer buf);
46 46
47#endif /* BUF_H */ 47#endif /* BUF_H */