public static final class TcpServer.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
TcpServer.Builder |
bindAddress(java.lang.String bindAddress)
The address to listen for (e.g.
|
TcpServer |
build() |
TcpServer.Builder |
listenAddress(java.net.InetSocketAddress listenAddress)
The
InetSocketAddress to listen on. |
TcpServer.Builder |
options(java.util.function.Consumer<? super ServerOptions.Builder<?>> options)
The options for the server, including bind address and port.
|
TcpServer.Builder |
port(int port)
The port to listen to, or 0 to dynamically attribute one.
|
public final TcpServer.Builder bindAddress(java.lang.String bindAddress)
bindAddress - address to listen for (e.g. 0.0.0.0 or 127.0.0.1)thispublic final TcpServer.Builder listenAddress(java.net.InetSocketAddress listenAddress)
InetSocketAddress to listen on.listenAddress - the listen addressthispublic final TcpServer.Builder port(int port)
port - the port to listen to, or 0 to dynamically attribute one.thispublic final TcpServer.Builder options(java.util.function.Consumer<? super ServerOptions.Builder<?>> options)
options - the options for the server, including bind address and port.thispublic TcpServer build()