mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
Redesign harbor/master/dummy service
This commit is contained in:
@@ -271,7 +271,13 @@ function socket.invalid(id)
|
||||
return socket_pool[id] == nil
|
||||
end
|
||||
|
||||
socket.listen = assert(driver.listen)
|
||||
function socket.listen(host, port, backlog)
|
||||
if port == nil then
|
||||
host, port = string.match(host, "([^:]+):(.+)$")
|
||||
port = tonumber(port)
|
||||
end
|
||||
return driver.listen(host, port, backlog)
|
||||
end
|
||||
|
||||
function socket.lock(id)
|
||||
local s = socket_pool[id]
|
||||
|
||||
Reference in New Issue
Block a user