[][src]Function multistream_select::listener_select_proto

pub fn listener_select_proto<R, I>(
    inner: R,
    protocols: I
) -> ListenerSelectFuture<R, I::Item>

Notable traits for ListenerSelectFuture<R, N>

impl<R, N> Future for ListenerSelectFuture<R, N> where
    R: AsyncRead + AsyncWrite + Unpin,
    N: AsRef<[u8]> + Clone
type Output = Result<(N, Negotiated<R>), NegotiationError>;
where
    R: AsyncRead + AsyncWrite,
    I: IntoIterator,
    I::Item: AsRef<[u8]>, 

Returns a Future that negotiates a protocol on the given I/O stream for a peer acting as the listener (or responder).

This function is given an I/O stream and a list of protocols and returns a computation that performs the protocol negotiation with the remote. The returned Future resolves with the name of the negotiated protocol and a Negotiated I/O stream.