end
local function socket_ip_connect(fn, address, port, handler, tag)
- local connected, socket = fn(address, port, socket_handler, tag)
+ local connected, socket = fn(address, port, handler, tag)
if connected == nil then
return nil
end
socket_new(socket, handler)
if connected then
- socket_handler(socket, "connect", tag)
+ handler(socket, "connect", tag)
end
return socket
end
local function socket_ip_bind(fn, address, port, handler, tag)
- local socket = fn(address, port, socket_handler, tag)
+ local socket = fn(address, port, handler, tag)
if not socket then
return nil
end