Share via


SocketImpl.Bind(InetAddress, Int32) Method

Definition

Binds this socket to the specified local IP address and port number.

[Android.Runtime.Register("bind", "(Ljava/net/InetAddress;I)V", "GetBind_Ljava_net_InetAddress_IHandler")]
protected abstract void Bind (Java.Net.InetAddress? host, int port);
[<Android.Runtime.Register("bind", "(Ljava/net/InetAddress;I)V", "GetBind_Ljava_net_InetAddress_IHandler")>]
abstract member Bind : Java.Net.InetAddress * int -> unit

Parameters

host
InetAddress

an IP address that belongs to a local interface.

port
Int32

the port number.

Attributes

Exceptions

if an error occurs while binding this socket.

Remarks

Binds this socket to the specified local IP address and port number.

Java documentation for java.net.SocketImpl.bind(java.net.InetAddress, int).

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