CAmvConn::IsConnected()

Return the current connection status.

Syntax

AMAP_CONNECT IsConnected();

Data Type

enum AMAP_CONNECT { NOT_CONNECTED, CONNECTED, RESYNCING };

Example

This example displays the current connection status.

TCHAR StatusString[16];

switch (IsConnected()) {

    case NOT_CONNECTED:

           strcpy(StatusString, "Not Connected");

           break;

    case CONNECTED:

           strcpy(StatusString, "Connected");

           break;

    case RESYNCING:

           strcpy(StatusString, "Resyncing");

           break;

}

fprintf(stdout, "Status: %s\n", StatusString);

More information

CAmvConn class member overview.