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
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
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
A transient connection is one that is not expected to be open for very long or one that cannot transfer very much data, such as one being used as a circuit relay connection. Protocols need to explicitly opt-in to being run over transient connections.
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.