SAWSSDK::connectToServer

Description

Connects to the remote server or cache server.

Syntax

int connectToServer(
        String strServer,
        int iPort,
        StringArray strAryCAFileFullPath,
        BaseDataObject bdoienumEncryptType,
        BaseDataObject bdobTrail,
        BaseDataObject bdoiLeftTrailDays,
        BaseDataObject bdoBRealServer,
        BaseDataObject
bdostrDBServerName,
        BaseDataObject bdostrDBName,
        BaseDataObject bdobCanceled,
        BaseDataObject bdostrError,
        boolean bHosting,
        String strCompanyName,
        int EnumProxyType,
        String strProxyServer,
        int iProxyPort,
        boolean bProxyNeedAuthentication,
        String strProxyUserName,
        String strProxyPassword

);

Parameters

strServer
[in] Specifies the IP or name of the server or cache server.

iPort
[in] Specifies the port of the server or cache server.

strAryCAFileFullPath
[in] Specifies the full path of the CRT files to be imported, if the client connect to the SSL secure port of the server.

bdoienumEncryptType
[out] Returns the type of the encryption.

bdobTrail
[out] Returns whether the software is a trial version.

bdoiLeftTrailDays
[out] Returns in how many days the trial version will expire.

bdoBRealServer
[out] Returns whether the client connects to server or cache sever.

bdostrDBServerName
[out] Returns the IP or name of the SQL server on which Dynamsoft SourceAnywhere Standalone database exists.

bdostrDBName
[out] Returns the database name of Dynamsoft SourceAnywhere Standalone.

bdobCanceled
[out] If the method fails, returns whether the operation is canceled.

bdostrError
[out] Returns the description of the result. If the operation succeeds, returns 'Completed'. If the operation fails, returns the error information.

bHosting
[out] Reserved parameter for future use.

strCompanyName
[out] Reserved parameter for future use.

enumProxyType
[in] Specifies the type of the proxy server.

strProxyServer
[in] Specifies the IP or name of proxy server (if proxy is used).

iProxyPort
[in] Specifies the port of proxy server (if proxy is used).

bProxyNeedAuthentication
[in] Specifies whether the proxy requires authentication (if proxy is used).

strProxyUserName
[in] Specifies the username (if proxy is used).

strProxyPassword
[in] Specifies the password (if proxy is used).

Return Value

If the method succeeds, returns 0. If the method fails, returns other error codes.

See Also