| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In this example:
>Client send: MDTM test.txt
>Server response: 213 20120824120909
Because FTP server do not open new channel (2XX response)
and LuaSocket try open new channel we get timeout.
```lua
local ftp = require "socket.ftp"
local ltn12 = require "ltn12"
local url = require("socket.url")
local URL = "ftp://USER:TEST@127.0.0.1";
local CMD = 'MDTM test.txt';
-- get timeout
ftp.get{
url = URL;
command = CMD;
sink = ltn12.sink.table{};
}
-- or we can use ftp.command
ftp.command{
url = URL;
command = URL,
check = function(...)
local status, data = ...
return true
end;
}
```
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |\
| |
| |
| | |
moteus-lua52
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
inet_pton was copying the entire sockaddr_in struct,
rather than just the sin_addr field...
I am a bit unsure about the UDP fix, because it may affect
TCP as well. On UDP sockets, when a sendto fails, the next
receive/receivefrom fails with CONNRESET. I changed
sock_recv/sock_recvfrom in wsocket.c to skip the CONNRESET
from the recv/recvfrom, hoping that if the socket is TCP,
sock_waitfd will get the CONNRESET again. The tests pass,
but this should be tested more thoroughly.
|
| | | |
|
| | | |
|
| | | |
|
| | |\ |
|
| | | | |
|
| | |/
|/|
| |
| | |
LUASOCKET_USE_GLOBAL flag enable create global variables when load socket/mime modules.
|
| | |
| |
| |
| | |
Add. test_bind.lua
|
| |/
|
|
| |
Add. test_getaddrinfo.lua
|
| | |
|
| |
|
|
|
|
|
| |
Previous implementation was not making sure the socket
had the same family as the addr returned by getaddrinfo.
So instead of "connection refused", we could get "invalid
argument", which was our fault.
|
| | |
|
| | |
|
| |\
| |
| |
| | |
pkulchenko
|
| | | |
|
| |/
|
|
|
| |
table.getn was deprecated in Lua 5.1 in favor of #, the length operator.
See: http://www.lua.org/manual/5.1/manual.html#7.2
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Copied socket_gaistrerror implementation from usocket to wsocket to allo...
|
| | |
| |
| |
| | |
Windows version to compile because it is missing the function. EAI_OVERFLOW and EAI_SYSTEM are commented out because they don't exist on Windows.
|
| |/ |
|
| |\
| |
| | |
Send SMTP AUTH LOGIN response using tp:send(). Fixes #18
|
| | |
| |
| |
| |
| |
| | |
tp:command() uppercases the command.
Without a command we would end up with a space in
front of the data. Therefore use send() directly here.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
There seems to be a curious difference between MacOS and
Linux and I am not sure if this is documented. When you
break a "connection" on Mac OS, you only eliminate the peer
association, but the local address remains bound. On Linux,
breaking a "connection" eliminates the binding to the local
address. Have you guys ever come accross this?
Another irritating difference is that connect() returns the
error EAFNOSUPPORT on Mac OS. I am going to ignore all
errors when the reason for calling connect() is simply to
break the "connection".
|
| |
|
|
|
|
|
| |
Bug was caught by user moteus.
Code was checking if arguments was nil after using
luaL_Buffer code, which messes with the stack.
Simple to fix, though.
|
| |
|
|
| |
Also fixed clean target to remove serial objects
|
| |\
| |
| | |
IPv6 support for udp:sendto() and udp:receivefrom()
|
| | | |
|
| | | |
|
| |\ \
| | |
| | | |
tcp: Initialize clnt->family in :accept()
|
| | |/
| |
| |
| |
| | |
Also unconditionally zero out the structs when allocated, for
good measure.
|
| | | |
|
| |/ |
|
| |
|
|
|
|
| |
Before this change, it was difficult to set default
directories for different platforms that would still
work with different Lua versions.
|
| |
|
|
|
|
|
| |
This avoid socket.lua duplicating the iteration over the results
of getaddrinfo(). Some problems with the C implementation not
initializing sockets or the luasocket family have also been fixed,
and error reporting made more robust.
|
| |\
| |
| | |
Reword error msg to distinguish between service and server
|
| | |
| |
| |
| |
| | |
servname is easily confused with "server name", making it seem
as if the server name couldn't be resolved.
|
| |\ \
| | |
| | | |
Rework makefiles to simplify setting and choosing build options.
|
| | |/
| |
| |
| |
| |
| | |
Includes documentation for common build settings, reasonable
defaults, and ability to set common build options in the
environment.
|
| |/
|
|
|
|
|
|
|
| |
This wrapper takes a domain name or an IP as first argument
and a service name or port as second argument.
Either argument may be nil.
It returns a list of names (always only one in the IP case) and a
service name.
|