pub fn start_with_protocols<A, T>(
    actor: A,
    protocols: &[&str],
    req: &HttpRequest,
    stream: T,
) -> Result<HttpResponse, Error>
where
    A: Actor<Context = WebsocketContext<A>> + StreamHandler<Result<Message, ProtocolError>>,
    T: Stream<Item = Result<Bytes, PayloadError>> + 'static,
{
    let mut res = handshake_with_protocols(req, protocols)?;
    Ok(res.streaming(WebsocketContext::create(actor, stream)))
}
/// Do WebSocket handshake and start ws actor.
///
/// `protocols` is a sequence of known protocols.
Do WebSocket handshake and start ws actor.
`protocols` is a sequence of known protocols.
Do WebSocket handshake and start ws actor . ` protocols ` is a sequence of known protocols .
pub fn start_with_protocols<A, T>(
    actor: A,
    protocols: &[&str],
    req: &HttpRequest,
    stream: T,
) -> Result<HttpResponse, Error>
where
    A: Actor<Context = WebsocketContext<A>> + StreamHandler<Result<Message, ProtocolError>>,
    T: Stream<Item = Result<Bytes, PayloadError>> + 'static,
{
    let mut res = handshake_with_protocols(req, protocols)?;
    Ok(res.streaming(WebsocketContext::create(actor, stream)))
}
pub fn start_with_protocols < A , T > ( actor : A , protocols : & [ & str ] , req : & HttpRequest , stream : T , ) -> Result < HttpResponse , Error > where A : Actor < Context = WebsocketContext < A > > + StreamHandler < Result < Message , ProtocolError > > , T : Stream < Item = Result < Bytes , PayloadError > > + ' static , { let mut res = handshake_with_protocols ( req , protocols ) ? ; Ok ( res . streaming ( WebsocketContext :: create ( actor , stream ) ) ) }
Do WebSocket handshake and start ws actor.
Do WebSocket handshake and start ws actor .
actor
A
protocols
&[&str]
req
&HttpRequest
stream
T
actor
A
protocols
&[&str]
req
&HttpRequest
stream
T