enum NATS::Client::State
Overview
The current state of the client's connection
Defined in:
nats.crEnum Members
-
Connecting =
0
-
The connection is currently awaiting a completed NATS connection. We could be awaiting TCP, TLS, NATS protocol handshake, synchronization, etc. Ideally, a client doesn't spend more than a few milliseconds in this state.
-
Connected =
1
-
A successful NATS connection has been made.
-
Disconnected =
2
-
The client has been disconnected and is either currently executing its disconnect handler or is waiting on the reconnect backoff period.
-
Reconnecting =
3
-
The disconnect handler has been invoked, the backoff period has elapsed and the client is currenty attempting to reconnect to the NATS server.
-
Closed =
4
-
The client has been explicitly closed with
NATS::Client#close
.