Share via


StandardSocketOptions.SoReuseaddr Property

Definition

Re-use address.

[Android.Runtime.Register("SO_REUSEADDR", ApiSince=24)]
public static Java.Net.ISocketOption? SoReuseaddr { get; }
[<Android.Runtime.Register("SO_REUSEADDR", ApiSince=24)>]
static member SoReuseaddr : Java.Net.ISocketOption

Property Value

Attributes

Remarks

Re-use address.

The value of this socket option is a Boolean that represents whether the option is enabled or disabled. The exact semantics of this socket option are socket type and system dependent.

In the case of stream-oriented sockets, this socket option will usually determine whether the socket can be bound to a socket address when a previous connection involving that socket address is in the <em>TIME_WAIT</em> state. On implementations where the semantics differ, and the socket option is not required to be enabled in order to bind the socket when a previous connection is in this state, then the implementation may choose to ignore this option.

For datagram-oriented sockets the socket option is used to allow multiple programs bind to the same address. This option should be enabled when the socket is to be used for Internet Protocol (IP) multicasting.

An implementation allows this socket option to be set before the socket is bound or connected. Changing the value of this socket option after the socket is bound has no effect. The default value of this socket option is system dependent.

Java documentation for java.net.StandardSocketOptions.SO_REUSEADDR.

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