We help IT Professionals succeed at work.

Broadcast a message using ICS

dolphin King
dolphin King asked
on
233 Views
Last Modified: 2017-04-06
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;

Open in new window


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 ?
Comment
Watch Question

Joan LewisBusiness Analyst Finance

Commented:
Hello Dolphin King,

Just go with this source it might help you to in right way: http://www.w3eoc.org/usingics213
Software architect
CERTIFIED EXPERT
Top Expert 2012
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions