mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-08-28 06:42:25 +02:00
Adjusted a few inconsistencies with the manual.
This commit is contained in:
@@ -32,7 +32,7 @@ end
|
||||
function dict_open()
|
||||
local sock, err = socket.connect("dict.org", 2628)
|
||||
if not sock then return nil, err end
|
||||
sock:timeout(10)
|
||||
sock:settimeout(10)
|
||||
local code, par = get_status(sock, 220)
|
||||
if code then return nil, code end
|
||||
return sock
|
||||
|
@@ -82,8 +82,8 @@ function Public.get(url)
|
||||
local udp, err = socket.udp()
|
||||
if not udp then return nil, err end
|
||||
-- convert from name to ip if needed
|
||||
parsed.host = socket.toip(parsed.host)
|
||||
udp:timeout(1)
|
||||
parsed.host = socket.dns.toip(parsed.host)
|
||||
udp:settimeout(1)
|
||||
-- first packet gives data host/port to be used for data transfers
|
||||
retries = 0
|
||||
repeat
|
||||
|
Reference in New Issue
Block a user