troubleshooting Question

Broadcast a message using ICS

Avatar of dolphin King
dolphin King asked on
Delphi
2 Comments1 Solution242 ViewsLast Modified:
i dont know if i do it right but here what i am doing


type
  TMyClient = class(TWSocketClient)
  private
    Connected: TDateTime;
    UniqueID: DWORD;
    procedure ConnectionDataAvailable(Sender: TObject; ErrCode: Word);

  public
    constructor Create(AOwner : TComponent); override;
    destructor Destroy; override;
    procedure Display(Msg: String);
  end;


procedure TMyClient.BroadcastMessage(const message : string);
var
Client : TMyclient;
Server : TWSocketServer;
I : integer;
begin
Server := mainserver.server;
for I := 0 to server.ClientCount -1 do
begin
  Client := TMyclient(server.Client[I]);
//do send
end;

end;

is my broadcast is correct ? i think its totally wrong because i use Server := mainserver.server; i dont feel good about this i am new to ics where to access the context list same way in indy with connection class ?
ASKER CERTIFIED SOLUTION
Sinisa Vuk
Software architect
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros