Redesign harbor/master/dummy service

This commit is contained in:
Cloud Wu
2014-06-21 17:01:59 +08:00
parent 7137850eb2
commit 9937081854
16 changed files with 793 additions and 1084 deletions

View File

@@ -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]