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
|
static TcpServerTransport |
create(reactor.netty.tcp.TcpServer server,
int maxFrameLength)
Creates a new instance
|
int |
maxFrameLength() |
Mono<CloseableChannel> |
start(io.rsocket.transport.ServerTransport.ConnectionAcceptor acceptor) |
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 static TcpServerTransport create(reactor.netty.tcp.TcpServer server, int maxFrameLength)
server - the TcpServer to usemaxFrameLength - max frame length being sent over the connectionNullPointerException - if server is nullpublic int maxFrameLength()
maxFrameLength in interface io.rsocket.transport.Transportpublic Mono<CloseableChannel> start(io.rsocket.transport.ServerTransport.ConnectionAcceptor acceptor)
start in interface io.rsocket.transport.ServerTransport<CloseableChannel>