Luasockets - socket.bind not working?

Hi! I’m building a websocket module but I need to take use of the Luasockets bind method. But it seems to return a nil value. The Socket.connect returns the tcp object. Any ideas what I’m doing wrong?

[lua]local socket = require(‘socket’)
server = socket.bind(‘localhost’, 8000)[/lua] [import]uid: 106083 topic_id: 18515 reply_id: 318515[/import]

Did you ever find out?  bind is failing for me too.

Works fine for me but I use 127.0.0.1 not localhost :slight_smile:

You also might want to check to make sure that port is not in use a nil value normally means that it can’t “bind” to the interface.

Thanks I solved it.  It was a settings permissions issue.  Corona no longer does default permissions for internet access.

Did you ever find out?  bind is failing for me too.

Works fine for me but I use 127.0.0.1 not localhost :slight_smile:

You also might want to check to make sure that port is not in use a nil value normally means that it can’t “bind” to the interface.

Thanks I solved it.  It was a settings permissions issue.  Corona no longer does default permissions for internet access.