接口 WebSocketService

  • 所有已知实现类:
    HandshakeWebSocketService

    public interface WebSocketService
    A service to delegate WebSocket-related HTTP requests to.

    For a WebSocket endpoint this means handling the initial WebSocket HTTP handshake request. For a SockJS endpoint it could mean handling all HTTP requests defined in the SockJS protocol.

    从以下版本开始:
    5.0
    作者:
    Rossen Stoyanchev
    另请参阅:
    HandshakeWebSocketService
    • 方法详细资料

      • handleRequest

        reactor.core.publisher.Mono<VoidhandleRequest​(ServerWebExchange exchange,
                                                        WebSocketHandler webSocketHandler)
        Handle the request with the given WebSocketHandler.
        参数:
        exchange - the current exchange
        webSocketHandler - handler for WebSocket session
        返回:
        a Mono<Void> that completes when application handling of the WebSocket session completes.