interface NetClient : Measured
A TCP client.
Multiple connections to different servers can be made using the same instance.
This client supports a configurable number of connection attempts and a configurable delay between attempts.
Author
Tim Fox
abstract fun close(): Unit
Close the client. Any sockets which have not been closed manually will be closed here. The close is asynchronous and may not complete until some time after the method has returned. |
|
abstract fun connect(port: Int, host: String, connectHandler: Handler<AsyncResult<NetSocket>>): NetClientabstract fun connect(port: Int, host: String, serverName: String, connectHandler: Handler<AsyncResult<NetSocket>>): NetClient
Open a connection to a server at the specific abstract fun connect(remoteAddress: SocketAddress, connectHandler: Handler<AsyncResult<NetSocket>>): NetClientabstract fun connect(remoteAddress: SocketAddress, serverName: String, connectHandler: Handler<AsyncResult<NetSocket>>): NetClient
Open a connection to a server at the specific The connect is done asynchronously and on success, a NetSocket instance is supplied via the |