[−][src]Function ntex::web::ws::start_with
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<Config = StreamEncoder<Tx>, Request = Frame, Response = Option<Message>>,
T::Error: StdError + 'static,
T::InitError: 'static,
T::Service: 'static,
F: IntoServiceFactory<T>,
S: Stream<Item = Result<Bytes, PayloadError>> + Unpin + 'static,
Err: From<T::InitError>,
Err: From<HandshakeError>,
Tx: Sink<Result<Bytes, Box<dyn StdError>>> + Clone + Unpin + 'static,
Tx::Error: StdError,
Rx: Stream<Item = Result<Bytes, Box<dyn StdError>>> + Unpin + 'static,
Do websocket handshake and start websockets service.