接口 WebSocketClient
- 所有已知实现类:
JettyWebSocketClient
,ReactorNettyWebSocketClient
,StandardWebSocketClient
,TomcatWebSocketClient
,UndertowWebSocketClient
public interface WebSocketClient
Contract for reactive-style handling of a WebSocket session.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Void>
execute(URI url, HttpHeaders headers, WebSocketHandler handler)
A variant ofexecute(URI, WebSocketHandler)
with custom headers.reactor.core.publisher.Mono<Void>
execute(URI url, WebSocketHandler handler)
Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.
方法详细资料
execute
reactor.core.publisher.Mono<Void> execute(URI url, WebSocketHandler handler)
Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.- 参数:
url
- the handshake urlhandler
- the handler of the WebSocket session- 返回:
- completion
Mono<Void>
to indicate the outcome of the WebSocket session handling.
execute
reactor.core.publisher.Mono<Void> execute(URI url, HttpHeaders headers, WebSocketHandler handler)
A variant ofexecute(URI, WebSocketHandler)
with custom headers.- 参数:
url
- the handshake urlheaders
- custom headers for the handshake requesthandler
- the handler of the WebSocket session- 返回:
- completion
Mono<Void>
to indicate the outcome of the WebSocket session handling.