Udostępnij za pośrednictwem


ParcelFileDescriptor.CreateReliableSocketPair Method

Definition

Create two ParcelFileDescriptors structured as a pair of sockets connected to each other.

[Android.Runtime.Register("createReliableSocketPair", "()[Landroid/os/ParcelFileDescriptor;", "")]
public static Android.OS.ParcelFileDescriptor[]? CreateReliableSocketPair ();
[<Android.Runtime.Register("createReliableSocketPair", "()[Landroid/os/ParcelFileDescriptor;", "")>]
static member CreateReliableSocketPair : unit -> Android.OS.ParcelFileDescriptor[]

Returns

Attributes

Exceptions

Remarks

Create two ParcelFileDescriptors structured as a pair of sockets connected to each other. The two sockets are indistinguishable.

Both ends have the ability to deliver an error message through #closeWithError(String) which can be detected by the other end calling #checkError(), usually after detecting an EOF. This can also be used to detect remote crashes.

Java documentation for android.os.ParcelFileDescriptor.createReliableSocketPair().

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