Function accept_stream

Source
pub async fn accept_stream<Io: AsyncBufRead + AsyncWrite + Unpin>(
    io: Io,
    stream_ns: &'static str,
    timeouts: Timeouts,
) -> Result<AcceptedStream<Io>, Error>
Expand description

Accept a new XML stream as responder

Prepares the responer side of an XML stream using the given I/O object io. The default XML namespace will be set to stream_ns.

The returned object contains the stream header sent by the remote side as well as the internal parser state to continue the negotiation.