Struct anjay_socket_entry_t

Struct Documentation

struct anjay_socket_entry_t

A structure that describes an open socket used by Anjay. Returned by anjay_get_socket_entries.

Public Members

avs_net_socket_t *socket

The socket described by this structure. It is intended to be used directly only for checking whether there is data ready, using mechanisms such as select() or poll().

anjay_socket_transport_t transport

Transport layer used by socket.

Guaranteed to not be ANJAY_SOCKET_TRANSPORT_INVALID, that value is only used internally.

anjay_ssid_t ssid

SSID of the server to which the socket is related. May be:

  • ANJAY_SSID_ANY if the socket is not directly and unambiguously related to any server, which includes:

    • download sockets

    • SMS communication socket (common for all servers; only in versions of Anjay that include the SMS commercial feature)

  • ANJAY_SSID_BOOTSTRAP for the Bootstrap Server socket

  • any other value for sockets related to regular LwM2M servers

bool queue_mode

Flag that is true in the following cases:

  • it is a UDP communication socket for a regular LwM2M server that is configured to use the “queue mode”, or

  • it is an SMS communication socket and all LwM2M servers that use this transport use the “queue mode” (only relevant to versions of Anjay that include the SMS commercial feature)

In either case, a queue mode socket will stop being returned from anjay_get_sockets and anjay_get_socket_entries after period defined by CoAP MAX_TRANSMIT_WAIT since last communication.