NATS C Client with Streaming support  2.5.1
The nats.io C Client, Supported by Synadia Communications Inc.
status.h File Reference

Go to the source code of this file.

Enumerations

enum  natsConnStatus {
  NATS_CONN_STATUS_DISCONNECTED = 0, NATS_CONN_STATUS_CONNECTING, NATS_CONN_STATUS_CONNECTED, NATS_CONN_STATUS_CLOSED,
  NATS_CONN_STATUS_RECONNECTING, NATS_CONN_STATUS_DRAINING_SUBS, NATS_CONN_STATUS_DRAINING_PUBS
}
 The connection state. More...
 
enum  natsStatus {
  NATS_OK = 0, NATS_ERR, NATS_PROTOCOL_ERROR, NATS_IO_ERROR,
  NATS_LINE_TOO_LONG, NATS_CONNECTION_CLOSED, NATS_NO_SERVER, NATS_STALE_CONNECTION,
  NATS_SECURE_CONNECTION_WANTED, NATS_SECURE_CONNECTION_REQUIRED, NATS_CONNECTION_DISCONNECTED, NATS_CONNECTION_AUTH_FAILED,
  NATS_NOT_PERMITTED, NATS_NOT_FOUND, NATS_ADDRESS_MISSING, NATS_INVALID_SUBJECT,
  NATS_INVALID_ARG, NATS_INVALID_SUBSCRIPTION, NATS_INVALID_TIMEOUT, NATS_ILLEGAL_STATE,
  NATS_SLOW_CONSUMER, NATS_MAX_PAYLOAD, NATS_MAX_DELIVERED_MSGS, NATS_INSUFFICIENT_BUFFER,
  NATS_NO_MEMORY, NATS_SYS_ERROR, NATS_TIMEOUT, NATS_FAILED_TO_INITIALIZE,
  NATS_NOT_INITIALIZED, NATS_SSL_ERROR, NATS_NO_SERVER_SUPPORT, NATS_NOT_YET_CONNECTED,
  NATS_DRAINING, NATS_INVALID_QUEUE_NAME, NATS_NO_RESPONDERS
}
 Status returned by most of the APIs. More...
 

Enumeration Type Documentation

Enumerator
NATS_CONN_STATUS_DISCONNECTED 

The connection has been disconnected.

NATS_CONN_STATUS_CONNECTING 

The connection is in the process or connecting.

NATS_CONN_STATUS_CONNECTED 

The connection is connected.

NATS_CONN_STATUS_CLOSED 

The connection is closed.

NATS_CONN_STATUS_RECONNECTING 

The connection is in the process or reconnecting.

NATS_CONN_STATUS_DRAINING_SUBS 

The connection is draining subscriptions.

NATS_CONN_STATUS_DRAINING_PUBS 

The connection is draining publishers.

enum natsStatus
Enumerator
NATS_OK 

Success.

NATS_ERR 

Generic error.

NATS_PROTOCOL_ERROR 

Error when parsing a protocol message, or not getting the expected message.

NATS_IO_ERROR 

IO Error (network communication).

NATS_LINE_TOO_LONG 

The protocol message read from the socket does not fit in the read buffer.

NATS_CONNECTION_CLOSED 

Operation on this connection failed because the connection is closed.

NATS_NO_SERVER 

Unable to connect, the server could not be reached or is not running.

NATS_STALE_CONNECTION 

The server closed our connection because it did not receive PINGs at the expected interval.

NATS_SECURE_CONNECTION_WANTED 

The client is configured to use TLS, but the server is not.

NATS_SECURE_CONNECTION_REQUIRED 

The server expects a TLS connection.

NATS_CONNECTION_DISCONNECTED 

The connection was disconnected. Depending on the configuration, the connection may reconnect.

NATS_CONNECTION_AUTH_FAILED 

The connection failed due to authentication error.

NATS_NOT_PERMITTED 

The action is not permitted.

NATS_NOT_FOUND 

An action could not complete because something was not found. So far, this is an internal error.

NATS_ADDRESS_MISSING 

Incorrect URL. For instance no host specified in the URL.

NATS_INVALID_SUBJECT 

Invalid subject, for instance NULL or empty string.

NATS_INVALID_ARG 

An invalid argument is passed to a function. For instance passing NULL to an API that does not accept this value.

NATS_INVALID_SUBSCRIPTION 

The call to a subscription function fails because the subscription has previously been closed.

NATS_INVALID_TIMEOUT 

Timeout must be positive numbers.

NATS_ILLEGAL_STATE 

An unexpected state, for instance calling natsSubscription_NextMsg() on an asynchronous subscriber.

NATS_SLOW_CONSUMER 

The maximum number of messages waiting to be delivered has been reached. Messages are dropped.

NATS_MAX_PAYLOAD 

Attempt to send a payload larger than the maximum allowed by the NATS Server.

NATS_MAX_DELIVERED_MSGS 

Attempt to receive more messages than allowed, for instance because of natsSubscription_AutoUnsubscribe().

NATS_INSUFFICIENT_BUFFER 

A buffer is not large enough to accommodate the data.

NATS_NO_MEMORY 

An operation could not complete because of insufficient memory.

NATS_SYS_ERROR 

Some system function returned an error.

NATS_TIMEOUT 

An operation timed-out. For instance natsSubscription_NextMsg().

NATS_FAILED_TO_INITIALIZE 

The library failed to initialize.

NATS_NOT_INITIALIZED 

The library is not yet initialized.

NATS_SSL_ERROR 

An SSL error occurred when trying to establish a connection.

NATS_NO_SERVER_SUPPORT 

The server does not support this action.

NATS_NOT_YET_CONNECTED 

A connection could not be immediately established and natsOptions_SetRetryOnFailedConnect() specified a connected callback. The connect is retried asynchronously.

NATS_DRAINING 

A connection and/or subscription entered the draining mode. Some operations will fail when in that mode.

NATS_INVALID_QUEUE_NAME 

An invalid queue name was passed when creating a queue subscription.

NATS_NO_RESPONDERS 

No responders were running when the server received the request.