MsgCommunicator: Delphi Instant Messaging (IM) SDK
for easy creation of custom messenger system
How to start.
Compile Client and Server demos. Run Server on one machine and distribute Client to all users' computers.
TCP/IP network of any configuration, UDP protocol. If you need something special, please contact email@example.com.
Do not forget to allow local/remote ports in firewalls.
- Registered user. Set UserID then call Connect or set Connected to True.
- New user. Call Connect then prepare UserInfo (you must set UserName at least) and register new user.
Connection settings can be tuned in ConnectionParams before connecting.
You can add connecting depended specific actions by setting BeforeConnect and/or AfterConnect event handlers.
procedure SendMessage(ToUserID: Cardinal; const Text: String); overload;
procedure SendMessage(ToUserID: Cardinal; Buffer: PChar; Size: Integer); overload;
procedure SendMessage(ToUserID: Cardinal; Stream: TStream); overload;
User details and users database.
RegisterNewUser - Registers new user at server
UpdateMyUserInfo - Changes user details
IsUserExisting - Determines if user is already registered at server
GetUserInfo - Determines if user with specified UserID exists in the server database and gets its details
Working with contact list.
RemoveUserFromMyContacts - Removes user from contact list of this client
|AddUserToMyContacts - Adds new user to contact list of the client (i.e. current user specified by UserID property)
GetMyContactsList - Gets full list of contacts for this client from all servers it is connected to
OnUserOnLine - Occurs when user presented in your contact list sets connection to the server
OnUserOffLine - Occurs when user presented in your contact list disconnects from the server
To send commands, call SendCommand.
To receive custom commands, set OnReceiveCommand event handler.
Writing server application.