TsgcWSPClient_E2EEMethods › CreateGroup

CreateGroup Method

Creates a new encrypted group on the server.

Syntax

function CreateGroup(const aGroup: string; aTimeout: Integer = 10000): TsgcE2EE_Group;

Parameters

NameTypeDescription
aGroupconst stringUnique name of the group to create. Must not match an existing group.
aTimeoutIntegerMaximum time in milliseconds to wait for the server acknowledgment (default 10000).

Return Value

The created group descriptor, or nil when the server did not acknowledge the operation within the timeout (TsgcE2EE_Group).

Remarks

Asks the server to create a new encrypted group identified by aGroup. The caller becomes the owner of the group and is automatically considered a member, so there is no need to call JoinGroup immediately after a successful CreateGroup. The server confirms creation by firing OnE2EEGroupCreated.

Example

if Assigned(oE2EE.CreateGroup('TEAM01')) then
  oE2EE.SendGroupMessage('TEAM01', 'hello team');

Back to Methods