Function network_clique::protocols::v1::outgoing
source · pub async fn outgoing<SK: SecretKey, D: Data, S: Splittable>(
stream: S,
secret_key: SK,
public_key: SK::PublicKey,
result_for_parent: UnboundedSender<(SK::PublicKey, Option<UnboundedSender<D>>)>,
data_for_user: UnboundedSender<D>,
metrics: Metrics
) -> Result<(), ProtocolError<SK::PublicKey>>
Expand description
Performs the outgoing handshake, and then manages a connection sending and receiving data. Exits on parent request, or in case of broken or dead network connection.