다음을 통해 공유


Network.BindSocket Method

Definition

Overloads

BindSocket(FileDescriptor)

Binds the specified FileDescriptor to this Network.

BindSocket(DatagramSocket)

Binds the specified DatagramSocket to this Network.

BindSocket(Socket)

Binds the specified Socket to this Network.

BindSocket(FileDescriptor)

Binds the specified FileDescriptor to this Network.

[Android.Runtime.Register("bindSocket", "(Ljava/io/FileDescriptor;)V", "GetBindSocket_Ljava_io_FileDescriptor_Handler", ApiSince=23)]
public virtual void BindSocket (Java.IO.FileDescriptor? fd);
[<Android.Runtime.Register("bindSocket", "(Ljava/io/FileDescriptor;)V", "GetBindSocket_Ljava_io_FileDescriptor_Handler", ApiSince=23)>]
abstract member BindSocket : Java.IO.FileDescriptor -> unit
override this.BindSocket : Java.IO.FileDescriptor -> unit

Parameters

Attributes

Remarks

Binds the specified FileDescriptor to this Network. All data traffic on the socket represented by this file descriptor will be sent on this Network, irrespective of any process-wide network binding set by ConnectivityManager#bindProcessToNetwork. The socket must not be connected.

Java documentation for android.net.Network.bindSocket(java.io.FileDescriptor).

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

BindSocket(DatagramSocket)

Binds the specified DatagramSocket to this Network.

[Android.Runtime.Register("bindSocket", "(Ljava/net/DatagramSocket;)V", "GetBindSocket_Ljava_net_DatagramSocket_Handler", ApiSince=22)]
public virtual void BindSocket (Java.Net.DatagramSocket? socket);
[<Android.Runtime.Register("bindSocket", "(Ljava/net/DatagramSocket;)V", "GetBindSocket_Ljava_net_DatagramSocket_Handler", ApiSince=22)>]
abstract member BindSocket : Java.Net.DatagramSocket -> unit
override this.BindSocket : Java.Net.DatagramSocket -> unit

Parameters

Attributes

Remarks

Binds the specified DatagramSocket to this Network. All data traffic on the socket will be sent on this Network, irrespective of any process-wide network binding set by ConnectivityManager#bindProcessToNetwork. The socket must not be connected.

Java documentation for android.net.Network.bindSocket(java.net.DatagramSocket).

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

BindSocket(Socket)

Binds the specified Socket to this Network.

[Android.Runtime.Register("bindSocket", "(Ljava/net/Socket;)V", "GetBindSocket_Ljava_net_Socket_Handler")]
public virtual void BindSocket (Java.Net.Socket? socket);
[<Android.Runtime.Register("bindSocket", "(Ljava/net/Socket;)V", "GetBindSocket_Ljava_net_Socket_Handler")>]
abstract member BindSocket : Java.Net.Socket -> unit
override this.BindSocket : Java.Net.Socket -> unit

Parameters

socket
Socket
Attributes

Exceptions

Remarks

Binds the specified Socket to this Network. All data traffic on the socket will be sent on this Network, irrespective of any process-wide network binding set by ConnectivityManager#bindProcessToNetwork. The socket must not be connected.

Java documentation for android.net.Network.bindSocket(java.net.Socket).

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