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


Retrieves information about all users registered at the server.

procedure GetUsers(
                   var Users:       TMsgUserInfoArray
                   const SortBy:    TMsgUserInfoArraySortBy = msgusbNone;
                   const Ascending: Boolean = True

Call GetUsers to get user details of all users which are registered in the server database and connection parameters of all users currently connected to the server.
Users - result array of user details.
SortBy - sorting type.
Ascending - if SortBy is set then Ascending determines if sort order is ascending or descending.
Call SortUsers to sort Users array. It will be faster than to call GetUsers once more.

You can use IsClientConnected method later to ensure that client is still connected.

To keep up array of users in actual status, use OnUserRegistered and OnUserInfoChanged to trace changes in server database of registered users, and also BeforeConnect / AfterConnect and BeforeDisconnect / AfterDisconnect event handlers to update current status of users.To learn connection details of new connected user, call GetUserInfo method.

© AidAim Software MsgCommunicator: