Classes
Members
Methods
lookup(port) → {EventEmitter}
Find the server instance for the given port.
Parameters:
Name | Type | Description |
---|---|---|
port |
number
|
The port number. |
Returns:
- Type:
-
EventEmitter
The server, or null if not found.
open(port, server) → {number}
Store the Server associated with a given port number in the kernel.
Parameters:
Name | Type | Description |
---|---|---|
port |
number
|
The port number. If null or 0, find the next unused port number starting with 1024. |
server |
EventEmitter
|
The server to store. Must support the 'close' event. |
Throws:
-
Address already in use for the given port.
- Type
-
Error
Returns:
- Type:
-
number
The selected port.