A TCP/SSL 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.

If an instance is instantiated from an event loop then the handlers of the instance will always be called on that same event loop. If an instance is instantiated from some other arbitrary Java thread (i.e. when using embedded) then an event loop will be assigned to the instance and used when any of its handlers are called.

Instances of this class are thread-safe.

no subtypes hierarchy

NetClient(NetClient delegate)
connectTimeoutshared Integer connectTimeout

The connect timeout in milliseconds

reconnectAttemptsshared Integer reconnectAttempts

Get the number of reconnect attempts

reconnectIntervalshared Integer reconnectInterval

Get the number of reconnect attempts

Inherited Attributes
Attributes inherited from: ClientBase
Attributes inherited from: NetworkBase
Attributes inherited from: Object
hash, string
connectshared Promise<NetSocket> connect(Integer port, String? host = null)

Attempt to open a connection to a server at the specific port and host. host can be a valid host name or IP address. The connect is done asynchronously and on success, a NetSocket instance is supplied via the returned promise

  • host = null
Inherited Methods
Methods inherited from: Object