TsgcWSPServer_PresenceEvents › OnErrorPublishMsg

OnErrorPublishMsg Event

Fired when a publish request from a client is rejected.

Syntax

property OnErrorPublishMsg: TsgcWSPresencePublishMsgErrorEvent;
// TsgcWSPresencePublishMsgErrorEvent = procedure(Connection: TsgcWSConnection; const aError: TsgcWSPresenceError; const aMsg: TsgcWSPresenceMsg; const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember) of object

Default Value

Remarks

Raised when a message a client tried to publish is refused, typically because OnBeforePublishMsg set Accept to False or because the publishing member does not belong to the target channel. aError describes the cause.

Example

procedure TForm1.sgcWSPServer_Presence1ErrorPublishMsg(Connection: TsgcWSConnection;
  const aError: TsgcWSPresenceError; const aMsg: TsgcWSPresenceMsg;
  const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember);
begin
  Log('#Error: ' + aError.Text);
end;

Back to Events