TsgcWSPServer_Presence › Events › OnErrorPublishMsg
Fired when a publish request from a client is rejected.
property OnErrorPublishMsg: TsgcWSPresencePublishMsgErrorEvent;
// TsgcWSPresencePublishMsgErrorEvent = procedure(Connection: TsgcWSConnection; const aError: TsgcWSPresenceError; const aMsg: TsgcWSPresenceMsg; const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember) of object
—
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.
procedure TForm1.sgcWSPServer_Presence1ErrorPublishMsg(Connection: TsgcWSConnection;
const aError: TsgcWSPresenceError; const aMsg: TsgcWSPresenceMsg;
const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember);
begin
Log('#Error: ' + aError.Text);
end;