DatagramSocket.Broadcast Property

Definition

Tests if SO_BROADCAST is enabled. -or- Enable/disable SO_BROADCAST.

public virtual bool Broadcast { [Android.Runtime.Register("getBroadcast", "()Z", "GetGetBroadcastHandler")] get; [Android.Runtime.Register("setBroadcast", "(Z)V", "GetSetBroadcast_ZHandler")] set; }
[<get: Android.Runtime.Register("getBroadcast", "()Z", "GetGetBroadcastHandler")>]
[<set: Android.Runtime.Register("setBroadcast", "(Z)V", "GetSetBroadcast_ZHandler")>]
member this.Broadcast : bool with get, set

Property Value

a boolean indicating whether or not SO_BROADCAST is enabled.

Attributes

Exceptions

if the socket is closed or the option is invalid.

if the socket is closed or the option could not be set.

Remarks

Property getter documentation:

Tests if SO_BROADCAST is enabled.

Added in 1.4.

Java documentation for java.net.DatagramSocket.getBroadcast().

Property setter documentation:

Enable/disable SO_BROADCAST.

Some operating systems may require that the Java virtual machine be started with implementation specific privileges to enable this option or send broadcast datagrams.

Added in 1.4.

Java documentation for java.net.DatagramSocket.setBroadcast(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to