aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-01-27 21:30:01 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-01-27 21:30:01 +0000
commitc5fefd5529e2b611367bcd917bfc2024d260e144 (patch)
tree338473c806c530b45767906f08bc73e19b16513a
parent2cd2a5d4a4ca9307eacbd73bc6c591d635204a8a (diff)
downloadluasocket-c5fefd5529e2b611367bcd917bfc2024d260e144.tar.gz
luasocket-c5fefd5529e2b611367bcd917bfc2024d260e144.tar.bz2
luasocket-c5fefd5529e2b611367bcd917bfc2024d260e144.zip
Simplified use for sock:send.
-rw-r--r--FIX3
-rw-r--r--TODO12
-rw-r--r--src/buffer.c4
3 files changed, 16 insertions, 3 deletions
diff --git a/FIX b/FIX
index 9cd7421..10a96b0 100644
--- a/FIX
+++ b/FIX
@@ -1 +1,2 @@
1tcp:shutdown() was checking for group instead of class. 1tcp{client}:shutdown() was checking for group instead of class.
2tcp{client}:send() now returns i+sent-1...
diff --git a/TODO b/TODO
index 2819707..ed00a6c 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,15 @@
1
2think about a dispatcher.
3 - it creates a server and receives a function that will do the work on
4 received connections
5 - this function is invoked with the client socket
6 - it calls special send and receive functions that yield on timeout
7
8think about how to extend http, ftp, smtp to use special send and receive
9functions for non-blocking so they can be used in the context of the
10dispatcher!
11
12adjust manual for new sock:send returns.
1check all "require("http")" etc in the manual. 13check all "require("http")" etc in the manual.
2_VERSION, _DEBUG, etc. 14_VERSION, _DEBUG, etc.
3get rid of "base." kludge 15get rid of "base." kludge
diff --git a/src/buffer.c b/src/buffer.c
index 1b1b791..0ec7b4d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -90,9 +90,9 @@ int buf_meth_send(lua_State *L, p_buf buf) {
90 if (err != IO_DONE) { 90 if (err != IO_DONE) {
91 lua_pushnil(L); 91 lua_pushnil(L);
92 lua_pushstring(L, buf->io->error(buf->io->ctx, err)); 92 lua_pushstring(L, buf->io->error(buf->io->ctx, err));
93 lua_pushnumber(L, sent); 93 lua_pushnumber(L, sent+start-1);
94 } else { 94 } else {
95 lua_pushnumber(L, sent); 95 lua_pushnumber(L, sent+start-1);
96 lua_pushnil(L); 96 lua_pushnil(L);
97 lua_pushnil(L); 97 lua_pushnil(L);
98 } 98 }