vertx / io.vertx.reactivex.core.net / NetServer

# NetServer

`open class NetServer : Measured`

Represents a TCP server NOTE: This class has been automatically generated from the io.vertx.core.net.NetServer non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `NetServer(delegate: NetServer)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<NetServer>`

### Functions

actualPort | `open 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
close | `open fun close(): Unit` Close the server. This will close any currently open connections. The close may not complete until after this method has returned. `open fun close(completionHandler: Handler<AsyncResult<Void>>): Unit` Like `io.vertx.reactivex.core.net.NetServer#close` but supplying a handler that will be notified when close is complete.
connectHandler | `open 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 io.vertx.reactivex.core.net.NetSocket and passes it to the connect handler.
connectStream | `open 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 io.vertx.reactivex.core.net.NetSocket and passes it to the connect stream .
equals | `open fun equals(other: Any?): Boolean`
exceptionHandler | `open fun exceptionHandler(handler: Handler<Throwable>): NetServer` Set an exception handler called for socket errors happening before the connection is passed to the `io.vertx.reactivex.core.net.NetServer#connectHandler`, e.g during the TLS handshake.
getDelegate | `open fun getDelegate(): NetServer`
hashCode | `open fun hashCode(): Int`
isMetricsEnabled | `open fun isMetricsEnabled(): Boolean` Whether the metrics are enabled for this measured object
listen | `open 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. `open fun listen(listenHandler: Handler<AsyncResult<NetServer>>): NetServer` `open fun listen(port: Int, host: String, listenHandler: Handler<AsyncResult<NetServer>>): NetServer` `open fun listen(port: Int, listenHandler: Handler<AsyncResult<NetServer>>): NetServer` `open fun listen(localAddress: SocketAddress, listenHandler: Handler<AsyncResult<NetServer>>): NetServer` Like `io.vertx.reactivex.core.net.NetServer#listen` but providing a handler that will be notified when the server is listening, or fails. `open 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 `0` can be specified meaning "choose an random port". Host `0.0.0.0` can be specified meaning "listen on all available interfaces". The server may not be listening until some time after the call to listen has returned. `open 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 `0` can be specified meaning "choose an random port". The server may not be listening until some time after the call to listen has returned. `open 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.
newInstance | `open static fun newInstance(arg: NetServer): NetServer`
rxClose | `open fun rxClose(): Completable` Like `io.vertx.reactivex.core.net.NetServer#close` but supplying a handler that will be notified when close is complete.
rxListen | `open fun rxListen(): Single<NetServer>` `open fun rxListen(port: Int, host: String): Single<NetServer>` `open fun rxListen(port: Int): Single<NetServer>` `open fun rxListen(localAddress: SocketAddress): Single<NetServer>` Like `io.vertx.reactivex.core.net.NetServer#listen` but providing a handler that will be notified when the server is listening, or fails.
toString | `open fun toString(): String`