Java.Net.ServerSocket.Bind Method
Binds this server socket to the given local socket address with a maximum backlog of 50 unaccepted connections.

Syntax

[Android.Runtime.Register("bind", "(Ljava/net/SocketAddress;)V", "GetBind_Ljava_net_SocketAddress_Handler")]
public virtual void Bind (SocketAddress localAddr)

Parameters

localAddr
the local address and port to bind on.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif the SocketAddress is not supported.
Java.IO.IOExceptionif the socket is already bound or a problem occurs during binding.

Remarks

Binds this server socket to the given local socket address with a maximum backlog of 50 unaccepted connections. If the localAddr is set to null the socket will be bound to an available local address on any free port of the system.

[Android Documentation]

Requirements

Namespace: Java.Net
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1