TAstaServerSocket.SendBroadcastEvent
Applies to
TAstaServerSocket
Declaration
procedure
SendBroadcastEvent(S: string);
Description
There are two methods that allow you to send broadcasts to connected clients.
The fist method, SendBroadcastPopup is intrusive and will display the message in a ShowMessage dialog box. This type of broadcast is appropriate for administrative messages.
The second method, SendBroadcastEvent, allows you to broadcast a message and control the way that it appears at the client. It must be used in conjunction with the AstaClientSocket's OnServerBroadcast event.
The following code shows how the AstaClientSocket's OnServerBroadcast event would copy a SendBroadcastEvent method to a memo.
procedure TForm1.AstaClientSocket1ServerBroadcast(Sender: TObject;
S: string);
begin
mServerBroadcasts.Lines.Add(S);
mServerBroadcasts.Lines.Add(Chr(VK_Return));
end;