Skip to content

tcp: Merge open_connection into the negotiate_connection fn #347

@lexnv

Description

@lexnv

/// Open connection to remote peer at `address`.
// TODO: this function can be removed
pub(super) async fn open_connection(
connection_id: ConnectionId,
keypair: Keypair,
stream: TcpStream,
address: AddressType,
peer: Option<PeerId>,
yamux_config: crate::yamux::Config,
max_read_ahead_factor: usize,
max_write_buffer_size: usize,
connection_open_timeout: Duration,
substream_open_timeout: Duration,
) -> Result<NegotiatedConnection, NegotiationError> {
tracing::debug!(
target: LOG_TARGET,
?address,
?peer,
"open connection to remote peer",
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowNice-to-have improvements, optimizations, or future considerationstodoExtracted from code todos

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions