|
The QMConnectionType() function sets parameters that affect the behaviour of QMClient.
The function takes a single argument, Type, which is a bit significant value that controls the session parameters.
Type can be formed from any of the following additive values:
| 1 | The next session to be opened will not take part in the device licensing system. |
| 2 | The next session to be opened will not use encrypted data traffic. This may result in increased transfer speeds but at the expense of weakened security. Note that the login authentication data (user name and password) is always encrypted when both the client and the server support this, regardless of the setting of this parameter. |
| 4 | The next session to be opened must use encrypted data traffic. If the server does not support encryption, the session will not be established. |
| 8 | Suppress display of error messages from within the QMClient library. Once set, this mode persists even if a later call to QMConnectionType does not include this value. Applications must test the value returned by QMError() to determine if an error has occurred. |
| 32 | All functions passing strings as 8-bit data use UTF-8 representation (C API only) |
Additional bit values may be used in future releases or for internal undocumented purposes.
The examples below use the QMConnectionType() function to disable network traffic encryption before attempting to connect to the server.
void QMConnectionType(int Type)
QMConnectionType(2);
if (!QMConnect(Host, -1, UserName, Password, Account))
{
printf("Failed to connect - %s\n", QMError());
}
|
QMConnectionType ByVal Type as Integer
QMConnectionType(2)
If Not QMConnect(Host, -1, UserName, Password, Account) Then
MsgBox(QMError(), MsgBoxStyle.Exclamation, "Failed to connect")
End If
|
session->ConnectionType = Type
session = object("!qmclient")
session->ConnectionType = 2
if not(session->Connect(Host, -1, UserName, Password, Account)) then
stop "Failed to connect - " : session->error()
end
The QMConnectionType function is implemented as a public property variable in this version of the QMClient API.
|
int ConnectionType
qm.ConnectionType = 2;
if (!qm.Connect(Host, -1, UserName, Password, Account))
{
System.out.println("Failed to connect - " + qm.Error());
}
The QMConnectionType function is implemented as a public property variable in this version of the QMClient API.
|
ConnectionType(Type)
qm.ConnectionType(2)
if not qm.Connect(Host, -1, UserName, Password, Account):
print("Failed to connect - ", qm.Error())
|
|