simpetcpserver Broadcast method
Return to Introduction  Previous page  Next page
Applies to
acSimpleTCPServer component.  

Declaration
function Broadcast(Buffer: PChar; BufLength: Integer): Integer;  

Description
The Broadcast  
 
This is the same as  
var  
  I: Integer;  
  TheString: String;  
  tmpClient: TacSimpleTCPClient;  
begin  
  TheString := 'test';  
  I := acSimpleTCPServer1.Connections.Count;  
  if I <> 0 then  
   for I := 0 to I - 1 do  
    begin  
     tmpClient := Server.Connections[I];  
     Server.Send(tmpClient, PChar(TheString), Length(TheString));  
    end;  
end;  

See also
Send, SendStream and BroadcastStream methods.