OptionaloncloseCallback for when the connection is closed for any reason.
This should be invoked when close() is called as well.
OptionalonerrorCallback for when an error occurs.
Note that errors are not necessarily fatal; they are used for reporting any kind of exceptional condition out of band.
OptionalonmessageCallback for when a message (request or response) is received over the connection.
Includes the requestInfo and authInfo if the transport is authenticated.
The requestInfo can be used to get the original request information (headers, etc.)
OptionalsessionThe session ID generated for this connection.
Closes the connection.
Sends a message with optional auth info. This is useful for testing authentication scenarios.
Optionaloptions: { authInfo?: AuthInfo; relatedRequestId?: RequestId }Starts processing messages on the transport, including any connection steps that might need to be taken.
This method should only be called after callbacks are installed, or else messages may be lost.
NOTE: This method should not be called explicitly when using Client, Server, or Protocol classes, as they will implicitly call start().
StaticcreateCreates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
In-memory transport for creating clients and servers that talk to each other within the same process.