Topic Path: Symbol Reference > Classes > TIdUDPBase Class > TIdUDPBase Methods > Broadcast Method
ContentsIndexHome
PreviousUpNext
TIdUDPBase.Broadcast Method

Send data to all computers on the network.

procedure Broadcast(
    const AData: string; 
    const APort: integer
);
Parameters 
Description 
AData 
Values to send in the datagram.
 
APort 
Port number for the transmission. 

Broadcast is a procedure used to send the data specified in AData using the port number specified in APort. Broadcast sends the data to all computers on the network. 

Note: 

Many network routers will not forward UDP broadcasts beyond the boundaries of the local network. 

Broadcast ensures that Binding has been allocated, and sets the socket option required for using broadcast capabilities. Broadcast also maintains BroadcastEnabled to indicate the current state of the socket option. 

Broadcast calls the Send method using the reserved Multicast network address '255.255.255.255' as the endpoint for the datagram.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.