Function ntex::web::ws::start_with[][src]

pub async fn start_with<T, F, S, Err, Tx, Rx>(
    req: HttpRequest,
    payload: S,
    tx: Tx,
    rx: Rx,
    factory: F
) -> Result<HttpResponse, Err> where
    T: ServiceFactory<Frame, StreamEncoder<Tx>, Response = Option<Message>> + 'static,
    T::Error: Error,
    F: IntoServiceFactory<T, Frame, StreamEncoder<Tx>>,
    S: Stream<Item = Result<Bytes, PayloadError>> + Unpin + 'static,
    Err: From<T::InitError> + From<HandshakeError>,
    Tx: Sink<Result<Bytes, Box<dyn Error>>> + Clone + Unpin + 'static,
    Tx::Error: Error,
    Rx: Stream<Item = Result<Bytes, Box<dyn Error>>> + Unpin + 'static, 
Expand description

Do websocket handshake and start websockets service.