public final class TcpServerTransport extends Object implements io.rsocket.transport.ServerTransport<CloseableChannel>
ServerTransport that connects to a ClientTransport via TCP.| Modifier and Type | Method and Description |
|---|---|
static TcpServerTransport |
create(InetSocketAddress address)
Creates a new instance
|
static TcpServerTransport |
create(int port)
Creates a new instance binding to localhost
|
static TcpServerTransport |
create(String bindAddress,
int port)
Creates a new instance
|
static TcpServerTransport |
create(reactor.netty.tcp.TcpServer server)
Creates a new instance
|
Mono<CloseableChannel> |
start(io.rsocket.transport.ServerTransport.ConnectionAcceptor acceptor,
int mtu) |
public static TcpServerTransport create(int port)
port - the port to bind topublic static TcpServerTransport create(String bindAddress, int port)
bindAddress - the address to bind toport - the port to bind toNullPointerException - if bindAddress is nullpublic static TcpServerTransport create(InetSocketAddress address)
address - the address to bind toNullPointerException - if address is nullpublic static TcpServerTransport create(reactor.netty.tcp.TcpServer server)
server - the TcpServer to useNullPointerException - if server is nullpublic Mono<CloseableChannel> start(io.rsocket.transport.ServerTransport.ConnectionAcceptor acceptor, int mtu)
start in interface io.rsocket.transport.ServerTransport<CloseableChannel>