Sdílet prostřednictvím


LocalServerSocket Constructors

Definition

Overloads

LocalServerSocket(FileDescriptor)

Create a LocalServerSocket from a file descriptor that's already been created and bound.

LocalServerSocket(String)

Creates a new server socket listening at specified name.

LocalServerSocket(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

LocalServerSocket(FileDescriptor)

Create a LocalServerSocket from a file descriptor that's already been created and bound.

[Android.Runtime.Register(".ctor", "(Ljava/io/FileDescriptor;)V", "")]
public LocalServerSocket (Java.IO.FileDescriptor? fd);
[<Android.Runtime.Register(".ctor", "(Ljava/io/FileDescriptor;)V", "")>]
new Android.Net.LocalServerSocket : Java.IO.FileDescriptor -> Android.Net.LocalServerSocket

Parameters

fd
FileDescriptor

bound file descriptor

Attributes

Exceptions

Remarks

Create a LocalServerSocket from a file descriptor that's already been created and bound. listen() will be called immediately on it. Used for cases where file descriptors are passed in via environment variables. The passed-in FileDescriptor is not managed by this class and must be closed by the caller. Calling #close() on a socket created by this method has no effect.

Java documentation for android.net.LocalServerSocket.LocalServerSocket(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

LocalServerSocket(String)

Creates a new server socket listening at specified name.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public LocalServerSocket (string? name);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Android.Net.LocalServerSocket : string -> Android.Net.LocalServerSocket

Parameters

name
String

address for socket

Attributes

Exceptions

Remarks

Creates a new server socket listening at specified name. On the Android platform, the name is created in the Linux abstract namespace (instead of on the filesystem).

Java documentation for android.net.LocalServerSocket.LocalServerSocket(java.lang.String).

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

LocalServerSocket(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected LocalServerSocket (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Net.LocalServerSocket : nativeint * Android.Runtime.JniHandleOwnership -> Android.Net.LocalServerSocket

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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