mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 12:28:21 +01:00
Simplified use for sock:send.
This commit is contained in:
parent
2cd2a5d4a4
commit
c5fefd5529
3
FIX
3
FIX
@ -1 +1,2 @@
|
|||||||
tcp:shutdown() was checking for group instead of class.
|
tcp{client}:shutdown() was checking for group instead of class.
|
||||||
|
tcp{client}:send() now returns i+sent-1...
|
||||||
|
12
TODO
12
TODO
@ -1,3 +1,15 @@
|
|||||||
|
|
||||||
|
think about a dispatcher.
|
||||||
|
- it creates a server and receives a function that will do the work on
|
||||||
|
received connections
|
||||||
|
- this function is invoked with the client socket
|
||||||
|
- it calls special send and receive functions that yield on timeout
|
||||||
|
|
||||||
|
think about how to extend http, ftp, smtp to use special send and receive
|
||||||
|
functions for non-blocking so they can be used in the context of the
|
||||||
|
dispatcher!
|
||||||
|
|
||||||
|
adjust manual for new sock:send returns.
|
||||||
check all "require("http")" etc in the manual.
|
check all "require("http")" etc in the manual.
|
||||||
_VERSION, _DEBUG, etc.
|
_VERSION, _DEBUG, etc.
|
||||||
get rid of "base." kludge
|
get rid of "base." kludge
|
||||||
|
@ -90,9 +90,9 @@ int buf_meth_send(lua_State *L, p_buf buf) {
|
|||||||
if (err != IO_DONE) {
|
if (err != IO_DONE) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushstring(L, buf->io->error(buf->io->ctx, err));
|
lua_pushstring(L, buf->io->error(buf->io->ctx, err));
|
||||||
lua_pushnumber(L, sent);
|
lua_pushnumber(L, sent+start-1);
|
||||||
} else {
|
} else {
|
||||||
lua_pushnumber(L, sent);
|
lua_pushnumber(L, sent+start-1);
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user