System.Net.Socket.TSocket.OpenBroadcast

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure OpenBroadcast(const Endpoint: TNetEndpoint); overload;
procedure OpenBroadcast(Port: Word); overload; inline;

C++

void __fastcall OpenBroadcast(const TNetEndpoint &Endpoint)/* overload */;
void __fastcall OpenBroadcast(System::Word Port)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Net.Socket.pas
System.Net.Socket.hpp
System.Net.Socket TSocket

Description

Configures your socket to send local sub-net broadcasts to the specified port or endpoint.

In order to use OpenBroadcast, the type of your socket must be UDP.

Exceptions

A call to OpenBroadcast can raise any of the following exceptions:

Exception Exception.Message Scenarios

ESocketError

Network socket error: <error message> (<error code>), on API 'setsockopt'

Network socket error: <error message> (<error code>), on API 'socket'

Only UDP socket types support broadcasts

Socket already open

See Also