DLN_CONNECTION_LOST_EV

The DLN_CONNECTION_LOST event is generated when connection to a server is lost. The event contains the host address and port number of the server.

 typedef struct
 {
    DLN_MSG_HEADER header;
    char host[DLN_MAX_HOST_LENGTH+1];
    uint16_t port;
 } __PACKED_ATTR DLN_CONNECTION_LOST_EV;

Parameters:

header

Defines the DLN message header DLN_MSG_HEADER. The event header contains the following fields:

  • size - The size of the message. It is equal to the size of the DLN_CONNECTION_LOST_EV structure.
  • msgId - Defines the message. For the DLN_CONNECTION_LOST_EV event it is set to 0x000F. The DLN_MSG_ID_CONNECTION_LOST_EV constant can be used.
  • echoCounter - A freerunning counter. It shows the number of events sent by the device. The echoCounter is reset when its value reaches 0xFFFF (65536).
  • handle - A handle to the DLN-series adapter. For the DLN_CONNECTION_LOST_EV event the HDLN_ALL_DEVICES value is used.
host
A server, the connection to which was lost. This value can be a URL (e.g. www.diolan.com), an IP address (e.g. 127.0.0.1) or the predefined localhost value.
port
A port number of the DLN server.