mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
add socket.bind
This commit is contained in:
@@ -139,11 +139,15 @@ function socket.open(addr, port)
|
||||
return connect(id)
|
||||
end
|
||||
|
||||
function socket.stdin()
|
||||
local id = driver.bind(1)
|
||||
function socket.bind(os_fd)
|
||||
local id = driver.bind(os_fd)
|
||||
return connect(id)
|
||||
end
|
||||
|
||||
function socket.stdin()
|
||||
return socket.bind(1)
|
||||
end
|
||||
|
||||
function socket.start(id, func)
|
||||
driver.start(id)
|
||||
return connect(id, func)
|
||||
|
||||
Reference in New Issue
Block a user