Contattaci: +1-877-99-BOPUP (877-992-6787)

IServerClient::TestConnection method

Makes a test connection to the IM server using the given address and TCP/IP port. This function can be used for verification purposes to check a presence of the IM server. The function does not establish a session with the IM server, it disconnects once the IM server accepts a connection.

HRESULT TestConnection(     LPSTR lpszServerAddress,     WORD wServerPort );

Parameters

lpszServerAddress
[in] Pointer to a null-terminated text buffer that contains the name or address of the IM server. The address can be IP address or DNS name of a computer. Size of the buffer must not exceed 255 symbols of length.
wServerPort
[in] WORD variable that specifies TCP/IP port on the IM server to connect to. Set this parameter to 0 value to use default port.

Return Value

S_OK
Connection to the IM server is successful.
E_FAIL
Cannot connect to the IM server because it is not found or not running. Check the server address and port.