You can use the Contexts
property to receive clients, and then using the IOHandler
each client you can send a message.
Var Clients : TList; i : integer; begin if not Assigned(IdTCPServer1.Contexts) then exit; Clients:=IdTCPServer1.Contexts.LockList; try for i := 0 to Clients.Count-1 do try TIdContext(Clients[i]).Connection.IOHandler.Write(LBuffer);//LBuffer is a TBytes with the data to send except ... end; finally IdTCPServer1.Contexts.UnlockList; end; end;
source share