public final class WebsocketClientTransport extends Object implements io.rsocket.transport.ClientTransport, io.rsocket.transport.TransportHeaderAware
ClientTransport that connects to a ServerTransport via a
Websocket.| Modifier and Type | Method and Description |
|---|---|
Mono<io.rsocket.DuplexConnection> |
connect(int mtu) |
static WebsocketClientTransport |
create(reactor.netty.http.client.HttpClient client,
String path)
Creates a new instance
|
static WebsocketClientTransport |
create(InetSocketAddress address)
Creates a new instance
|
static WebsocketClientTransport |
create(int port)
Creates a new instance connecting to localhost
|
static WebsocketClientTransport |
create(String bindAddress,
int port)
Creates a new instance
|
static WebsocketClientTransport |
create(reactor.netty.tcp.TcpClient client)
Creates a new instance
|
static WebsocketClientTransport |
create(URI uri)
Creates a new instance
|
void |
setTransportHeaders(Supplier<Map<String,String>> transportHeaders) |
public static WebsocketClientTransport create(int port)
port - the port to connect topublic static WebsocketClientTransport create(String bindAddress, int port)
bindAddress - the address to connect toport - the port to connect toNullPointerException - if bindAddress is nullpublic static WebsocketClientTransport create(InetSocketAddress address)
address - the address to connect toNullPointerException - if address is nullpublic static WebsocketClientTransport create(URI uri)
uri - the URI to connect toNullPointerException - if uri is nullpublic static WebsocketClientTransport create(reactor.netty.tcp.TcpClient client)
client - the TcpClient to useNullPointerException - if client or path is nullpublic static WebsocketClientTransport create(reactor.netty.http.client.HttpClient client, String path)
client - the HttpClient to usepath - the path to requestNullPointerException - if client or path is nullpublic Mono<io.rsocket.DuplexConnection> connect(int mtu)
connect in interface io.rsocket.transport.ClientTransport