public final class TcpClientTransport extends Object implements io.rsocket.transport.ClientTransport
ClientTransport that connects to a ServerTransport via TCP.| Modifier and Type | Method and Description |
|---|---|
Mono<io.rsocket.DuplexConnection> |
connect() |
static TcpClientTransport |
create(InetSocketAddress address)
Creates a new instance
|
static TcpClientTransport |
create(int port)
Creates a new instance connecting to localhost
|
static TcpClientTransport |
create(String bindAddress,
int port)
Creates a new instance
|
static TcpClientTransport |
create(reactor.netty.tcp.TcpClient client)
Creates a new instance
|
static TcpClientTransport |
create(reactor.netty.tcp.TcpClient client,
int maxFrameLength)
Creates a new instance
|
int |
maxFrameLength() |
public static TcpClientTransport create(int port)
port - the port to connect topublic static TcpClientTransport create(String bindAddress, int port)
bindAddress - the address to connect toport - the port to connect toNullPointerException - if bindAddress is nullpublic static TcpClientTransport create(InetSocketAddress address)
address - the address to connect toNullPointerException - if address is nullpublic static TcpClientTransport create(reactor.netty.tcp.TcpClient client)
client - the TcpClient to useNullPointerException - if client is nullpublic static TcpClientTransport create(reactor.netty.tcp.TcpClient client, int maxFrameLength)
client - the TcpClient to usemaxFrameLength - max frame length being sent over the connectionNullPointerException - if client is nullpublic int maxFrameLength()
maxFrameLength in interface io.rsocket.transport.Transportpublic Mono<io.rsocket.DuplexConnection> connect()
connect in interface io.rsocket.transport.ClientTransport