net_server.listen()

server.listen(handle[, backlog][, callback])

The handle object can be set to either a server or socket (anything with an underlying _handle member), or a {fd: <n>} object.

This will cause the server to accept connections on the specified handle, but it is presumed that the file descriptor or handle has already been bound to a port or domain socket.

Listening on a file descriptor is not supported on Windows.

This function is asynchronous. When the server has been bound, 'listening' event will be emitted. The last parameter callback will be added as a listener for the 'listening' event.

The parameter backlog behaves the same as in server.listen(port[, hostname][, backlog][, callback]).

doc_Nodejs
2016-04-30 04:40:31
Comments
Leave a Comment

Please login to continue.