Skip to content

Commit

Permalink
add socket.bind
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Apr 22, 2014
1 parent 2e1a035 commit 0e5f17e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lualib/socket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0e5f17e

Please sign in to comment.