MsgCommunicator: Delphi Instant Messaging (IM) SDK
for easy creation of custom messenger system


TMsgClient.Logon
TMsgClient
Top 

Authentication on the server.

procedure Logon;

Description
Call Logon to authenticate a user on the server.

Logon sends command to the server, waits for an answer, then receive contacts list of this client and sets the Logged property to True if this user is authenticated successfully.

You must be connected to the server before calling Logon.

Logon returns the following result codes:

Name
Value
MSG_Error_Logon_NotConnected
60092
MSG_Error_Logon_SendCommandFailed
60093
MSG_Error_Logon_ReceiveResultFailed
60094
MSG_Error_Logon_UserDoesNotExist
60095
MSG_Error_Logon_InvalidPassword
60096
MSG_Error_Logon_InvalidServerReply
60097
MSG_Error_Logon_InvalidParams
60112
MSG_Error_Logon_InternalServerError
60113
MSG_Error_Logon_UserAlreadyLogged
60114
MSG_Error_Logon_MaxConnectionsExceeded
60118


Also you can check Logged property to learn does this user has been authenticated successfully or not.

You should specify UserID property before calling Logon. If your user has registered on the server with a password, you should specify Password property before calling Logon.

If the user is not registered on the server yet, you must set UserID to MSG_INVALID_USER_ID then call RegisterNewUser to register a new user and to obtain a valid UserID.



© AidAim Software MsgCommunicator: Delphi Messenger Sdk Instant Messaging Sdk Im Sd