listen

Function listen 

Source
pub async fn listen<R: CryptoRngCore + Clock, S: Signer, I: Stream, O: Sink, Fut: Future<Output = bool>, F: FnOnce(S::PublicKey) -> Fut>(
    ctx: R,
    bouncer: F,
    config: Config<S>,
    stream: I,
    sink: O,
) -> Result<(S::PublicKey, Sender<O>, Receiver<I>), Error>
Expand description

Accepts an authenticated connection from a peer as the listener. Returns the peer’s identity, sender, and receiver for encrypted communication.