interface NetServer : Measured
Represents a TCP server
Author
Tim Fox
abstract fun actualPort(): Int
The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port |
|
abstract fun close(): Unit
Close the server. This will close any currently open connections. The close may not complete until after this method has returned. abstract fun close(completionHandler: Handler<AsyncResult<Void>>): Unit
Like |
|
abstract fun connectHandler(handler: Handler<NetSocket>): NetServer
Supply a connect handler for this server. The server can only have at most one connect handler at any one time. As the server accepts TCP or SSL connections it creates an instance of NetSocket and passes it to the connect handler. abstract fun connectHandler(): Handler<NetSocket> |
|
abstract fun connectStream(): ReadStream<NetSocket>
Return the connect stream for this server. The server can only have at most one handler at any one time. As the server accepts TCP or SSL connections it creates an instance of NetSocket and passes it to the connect stream |
|
abstract fun exceptionHandler(handler: Handler<Throwable>): NetServer
Set an exception handler called for socket errors happening before the connection is passed to the |
|
abstract fun listen(): NetServer
Start listening on the port and host as configured in the io.vertx.core.net.NetServerOptions used when creating the server. The server may not be listening until some time after the call to listen has returned. abstract fun listen(listenHandler: Handler<AsyncResult<NetServer>>): NetServer
Like abstract fun listen(port: Int, host: String): NetServer
Start listening on the specified port and host, ignoring port and host configured in the io.vertx.core.net.NetServerOptions used when creating the server. Port Host The server may not be listening until some time after the call to listen has returned. abstract fun listen(port: Int, host: String, listenHandler: Handler<AsyncResult<NetServer>>): NetServer
Like abstract fun listen(port: Int): NetServer
Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.core.net.NetServerOptions used when creating the server. Port The server may not be listening until some time after the call to listen has returned. abstract fun listen(port: Int, listenHandler: Handler<AsyncResult<NetServer>>): NetServer
Like abstract fun listen(localAddress: SocketAddress): NetServer
Start listening on the specified local address, ignoring port and host configured in the io.vertx.core.net.NetServerOptions used when creating the server. The server may not be listening until some time after the call to listen has returned. abstract fun listen(localAddress: SocketAddress, listenHandler: Handler<AsyncResult<NetServer>>): NetServer
Like |