Outbound conections are opened by the local node, inbound streams are opened by the remote
Optional
encryptionThe encryption protocol negotiated for this connection
The unique identifier for this connection
Optional
limitsIf present, this connection has limits applied to it, perhaps by an intermediate relay. Once the limits have been reached the connection will be closed by the relay.
The connection logger
Optional
multiplexerThe multiplexer negotiated for this connection
The address of the remote end of the connection
The id of the peer at the remote end of the connection
Optional
rttThe time in milliseconds it takes to make a round trip to the remote peer.
This is updated periodically by the connection monitor.
The current status of the connection
A list of open streams on this connection
A list of tags applied to this connection
Lifecycle times for the connection
Immediately close the connection, any queued data will be discarded
Gracefully close the connection. All queued data will be written to the underlying transport.
Optional
options: AbortOptionsCreate a new stream on this connection and negotiate one of the passed protocols
Optional
options: NewStreamOptions
A Connection is a high-level representation of a connection to a remote peer that may have been secured by encryption and multiplexed, depending on the configuration of the nodes between which the connection is made.