Function actix_web_actors::ws::start_with_protocols[][src]

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, 
👎 Deprecated since 4.0.0:

Prefer WsResponseBuilder for setting protocols.

Expand description

Do WebSocket handshake and start ws actor.

protocols is a sequence of known protocols.