- Source:
- network.js, line 26
Classes
Members
-
<static> localAddress
-
The network address of the local computer.
- Source:
- network.js, line 35
-
<static> localName
-
The network name of the local computer.
- Source:
- network.js, line 41
Methods
-
<static> listenOnPort(port, callback)
-
Listen on given port.
Parameters:
Name Type Description port
Number The port to listen on.
callback
listenCallback Callback called when connections are accepted.
- Source:
- network.js, line 43
Type Definitions
-
listenCallback(error, peer)
-
Callback used when clients are connecting to an open port.
Parameters:
Name Type Description error
String Error message, or null if no error.
peer
Socket The socket to the peer. It is already open.
- Source:
- network.js, line 166