ServerSocket.Bind Method

Definition

Overloads

Bind(SocketAddress)

Binds the ServerSocket to a specific address (IP address and port number).

Bind(SocketAddress, Int32)

Binds the ServerSocket to a specific address (IP address and port number).

Bind(SocketAddress)

Binds the ServerSocket to a specific address (IP address and port number).

[Android.Runtime.Register("bind", "(Ljava/net/SocketAddress;)V", "GetBind_Ljava_net_SocketAddress_Handler")]
public virtual void Bind (Java.Net.SocketAddress? endpoint);
[<Android.Runtime.Register("bind", "(Ljava/net/SocketAddress;)V", "GetBind_Ljava_net_SocketAddress_Handler")>]
abstract member Bind : Java.Net.SocketAddress -> unit
override this.Bind : Java.Net.SocketAddress -> unit

Parameters

endpoint
SocketAddress

The IP address and port number to bind to.

Attributes

Exceptions

if the SocketAddress is not supported.

if the socket is already bound or a problem occurs during binding.

Remarks

Java documentation for java.net.ServerSocket.bind(java.net.SocketAddress).

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

Bind(SocketAddress, Int32)

Binds the ServerSocket to a specific address (IP address and port number).

[Android.Runtime.Register("bind", "(Ljava/net/SocketAddress;I)V", "GetBind_Ljava_net_SocketAddress_IHandler")]
public virtual void Bind (Java.Net.SocketAddress? endpoint, int backlog);
[<Android.Runtime.Register("bind", "(Ljava/net/SocketAddress;I)V", "GetBind_Ljava_net_SocketAddress_IHandler")>]
abstract member Bind : Java.Net.SocketAddress * int -> unit
override this.Bind : Java.Net.SocketAddress * int -> unit

Parameters

endpoint
SocketAddress

The IP address and port number to bind to.

backlog
Int32

the maximum number of unaccepted connections. Passing 0 or a negative value yields the default backlog of 50.

Attributes

Exceptions

if the SocketAddress is not supported.

if the socket is already bound or a problem occurs during binding.

Remarks

Java documentation for java.net.ServerSocket.bind(java.net.SocketAddress).

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