class NetServer extends Measured

Represents a TCP server

Linear Supertypes
Measured, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NetServer
  2. Measured
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NetServer(_asJava: AnyRef)

Value Members

  1. def actualPort(): Int

    The actual port the server is listening on.

    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 * @return the actual port the server is listening on.

  2. def asJava: AnyRef
    Definition Classes
    NetServerMeasured
  3. def close(completionHandler: Handler[AsyncResult[Unit]]): Unit

    Like io.vertx.scala.core.net.NetServer#close but supplying a handler that will be notified when close is complete.

    Like io.vertx.scala.core.net.NetServer#close but supplying a handler that will be notified when close is complete. * @param completionHandler the handler

  4. def close(): Unit

    Close the server.

    Close the server. This will close any currently open connections. The close may not complete until after this method has returned.

  5. def closeFuture(): scala.concurrent.Future[Unit]

    Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  6. def connectHandler(handler: Handler[NetSocket]): NetServer

    Supply a connect handler for this server.

    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.scala.core.net.NetSocket and passes it to the connect handler. * @return a reference to this, so the API can be used fluently

  7. def connectStream(): ReadStream[NetSocket]

    Return the connect stream for this server.

    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.scala.core.net.NetSocket and passes it to the connect stream . * @return the connect stream

  8. def isMetricsEnabled(): Boolean

    Whether the metrics are enabled for this measured object * @return true if metrics are enabled

    Whether the metrics are enabled for this measured object * @return true if metrics are enabled

    Definition Classes
    NetServerMeasured
  9. def listen(localAddress: SocketAddress, listenHandler: Handler[AsyncResult[NetServer]]): NetServer

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param localAddress the local address to listen on

    listenHandler

    handler that will be notified when listening or failed

    returns

    a reference to this, so the API can be used fluently

  10. def listen(localAddress: SocketAddress): NetServer

    Start listening on the specified local address, ignoring port and host configured in the NetServerOptions used when creating the server.

    Start listening on the specified local address, ignoring port and host configured in the NetServerOptions used when creating the server.

    The server may not be listening until some time after the call to listen has returned. * @param localAddress the local address to listen on

    returns

    a reference to this, so the API can be used fluently

  11. def listen(port: Int, listenHandler: Handler[AsyncResult[NetServer]]): NetServer

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param port the port to listen on

    listenHandler

    handler that will be notified when listening or failed

    returns

    a reference to this, so the API can be used fluently

  12. def listen(port: Int): NetServer

    Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the NetServerOptions used when creating the server.

    Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the 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. * @return a reference to this, so the API can be used fluently

  13. def listen(port: Int, host: String, listenHandler: Handler[AsyncResult[NetServer]]): NetServer

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param port the port to listen on

    host

    the host to listen on

    listenHandler

    handler that will be notified when listening or failed

    returns

    a reference to this, so the API can be used fluently

  14. def listen(port: Int, host: String): NetServer

    Start listening on the specified port and host, ignoring port and host configured in the NetServerOptions used when creating the server.

    Start listening on the specified port and host, ignoring port and host configured in the 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. * @return a reference to this, so the API can be used fluently

  15. def listen(listenHandler: Handler[AsyncResult[NetServer]]): NetServer

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails.

    Like io.vertx.scala.core.net.NetServer#listen but providing a handler that will be notified when the server is listening, or fails. * @param listenHandler handler that will be notified when listening or failed

    returns

    a reference to this, so the API can be used fluently

  16. def listen(): NetServer

    Start listening on the port and host as configured in the NetServerOptions used when creating the server.

    Start listening on the port and host as configured in the NetServerOptions used when creating the server.

    The server may not be listening until some time after the call to listen has returned. * @return a reference to this, so the API can be used fluently

  17. def listenFuture(localAddress: SocketAddress): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  18. def listenFuture(port: Int): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  19. def listenFuture(port: Int, host: String): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  20. def listenFuture(): scala.concurrent.Future[NetServer]

    Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.