Constructor
new HalfSocket(name, opts)
Creates an instance of HalfSocket.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
The name of this socket end, for debugging. |
opts |
stream.DuplexOptions
|
Options for the socket end. |
Fires:
- {HalfSocket#written} When data is written to this side of the socket to be sent.event:
Classes
Methods
emit(eventName, …args) → {boolean}
Add debug logging to EventEmitter. Start with NODE_DEBUG=mock-tls-server
to see all events.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eventName |
string
|
The name of the event. | |
args |
Array.<any>
|
<repeatable> |
The arguments to be passed to listeners. |
Returns:
- Type:
-
boolean
Returns `true` if the event had listeners, `false`
otherwise.