System.Net.Socket.TSocket.ListenBroadcast

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

void __fastcall ListenBroadcast(const TNetEndpoint &Endpoint)/* overload */;
void __fastcall ListenBroadcast(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

Binds your socket to the specified port or endpoint and configures your socket for receiving sub-net broadcasts.

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

Exceptions

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

Exception Exception.Message Scenarios

ESocketError

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

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

Only UDP socket types support broadcasts

Socket already open

See Also