Create a new CascadeDriver instance
the available subtransports
the connection options
a list of available transport names
an emitter for emitting events on the Transports stream
An emitter for emitting events on the Transports stream
The emitter for emitting data
, close
, and error
events
The name of the transport
The handshake error handler
The handshake handler
The connection request.
A flag indicating whether a response has been received
The current transport object.
A factory function for creating transports
A list of available transport names
Cascade to the next available transport
A close
event may be emitted on this stream and a cascade
event is
emitted on the Transports stream.
a flag indicating whether a close
event should be
suppressed
true if attempting to connect, false if transports exhausted
Close the transport
this stream
Close the current transport quietly, without generating any events.
Connect using the available transports
the connection request.
the handshake handler
the handshake error handler
Send a binary message to the server.
the message to send
Connect to the current transport
A cascading-connect
event is emitted on the Transports stream.
true if attempting to connect
Called when the transport emits a close
event.
Only emits a close
event on this stream if it can't cascade further
the reason for closing
Called when the connection response is received.
the connection response from the server
Called when the transport emits a data
event.
Forwards the data and emits a data
on this stream
the message data
Called when the transport emits an error
event.
Forwards the data and emits a error
on this stream
the error that occurred
Called when the connection response cannot be parsed.
the error that occurred
Select and create the next enabled transport.
If there are no more transports then a close
event may be emitted on
this stream and a transports-exhausted
event is emitted on the Transports stream.
a flag indicating whether a close
event should be
suppressed
the selected transport
Encapsulate the set of available transport mechanisms and expose them in an implementation independent manner.