DatagramSocket.Bind(SocketAddress) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Binds this DatagramSocket to a specific address and port.
[Android.Runtime.Register("bind", "(Ljava/net/SocketAddress;)V", "GetBind_Ljava_net_SocketAddress_Handler")]
public virtual void Bind(Java.Net.SocketAddress? addr);
[<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
- addr
- SocketAddress
The address and port to bind to.
- Attributes
if the SocketAddress is not supported
if the socket is already bound or a problem occurs during binding.
Binds this DatagramSocket to a specific address and port.
If the address is null
, then the system will pick up an ephemeral port and a valid local address to bind the socket.
Added in 1.4.
Java documentation for java.net.DatagramSocket.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
Продукт | Версии |
---|---|
.NET for Android | .NET for Android API 34, .NET for Android API 35, .NET for Android API 36 |