new Server(host, port, options){Server}
Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
host |
string |
The host for the server, can be either an IP4, IP6 or domain socket style host. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
port |
number |
optional
The server port if IP4. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
object | null |
optional
Optional settings.
|
- Deprecated
- Yes
Properties:
Name | Type | Description |
---|---|---|
parserType |
string | the parser type used (c++ or js). |
Fires:
- Server#event:connect
- Server#event:close
- Server#event:error
- Server#event:timeout
- Server#event:parseError
- Server#event:reconnect
- Server#event:commandStarted
- Server#event:commandSucceeded
- Server#event:commandFailed
Returns:
Server instance.Events
-
close
-
Server close event
Type:
- object
-
commandFailed
-
An event emitted indicating a command failed, if command monitoring is enabled
Type:
- object
-
commandStarted
-
An event emitted indicating a command was started, if command monitoring is enabled
Type:
- object
-
commandSucceeded
-
An event emitted indicating a command succeeded, if command monitoring is enabled
Type:
- object
-
connect
-
Server connect event
Type:
- object
-
error
-
Server error event
Type:
-
parseError
-
Server parseError event
Type:
- object
-
reconnect
-
Server reconnect event
Type:
- object
-
timeout
-
Server timeout event
Type:
- object