Constructor
new MockTLSServer(optionsopt, secureConnectionListeneropt)
Create a MockTLSServer instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
ServerOpts
|
SecureConnectionCallback
|
<optional> |
Server options. |
secureConnectionListener |
SecureConnectionCallback
|
<optional> |
Installed as a listener for the 'secureConnection' event. |
Classes
Methods
listen(optionsopt, secureConnectionListeneropt) → {MockTLSServer}
Listen for incoming connections. Whenever `connect` is called on this
server's port, create a mock socket wrapped in a TLSSocket.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
number
|
ListenOptions
|
<optional> |
Port number or options object. |
secureConnectionListener |
function
|
<optional> |
If it exists, installed as a listener for the 'secureConnection' event. |