接口 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
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Void>
handleRequest(ServerWebExchange exchange, WebSocketHandler webSocketHandler)
Handle the request with the givenWebSocketHandler
.
方法详细资料
handleRequest
reactor.core.publisher.Mono<Void> handleRequest(ServerWebExchange exchange, WebSocketHandler webSocketHandler)
Handle the request with the givenWebSocketHandler
.- 参数:
exchange
- the current exchangewebSocketHandler
- handler for WebSocket session- 返回:
- a
Mono<Void>
that completes when application handling of the WebSocket session completes.