mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
socket.listen returns addr,port
This commit is contained in:
@@ -263,11 +263,8 @@ skynet.start(function()
|
||||
end
|
||||
end)
|
||||
skynet.wait()
|
||||
socket.close(slave_fd)
|
||||
else
|
||||
-- slave_fd does not start, so use close_fd.
|
||||
socket.close_fd(slave_fd)
|
||||
end
|
||||
socket.close(slave_fd)
|
||||
skynet.error("Shakehand ready")
|
||||
skynet.fork(ready)
|
||||
end)
|
||||
|
||||
@@ -118,7 +118,7 @@ local function console_main_loop(stdin, print, addr)
|
||||
end
|
||||
|
||||
skynet.start(function()
|
||||
local listen_socket = socket.listen (ip, port)
|
||||
local listen_socket, ip, port = socket.listen (ip, port)
|
||||
skynet.error("Start debug console at " .. ip .. ":" .. port)
|
||||
socket.start(listen_socket , function(id, addr)
|
||||
local function print(...)
|
||||
|
||||
Reference in New Issue
Block a user