Share via


SocketChannel.Socket Method

Definition

Retrieves a socket associated with this channel.

[Android.Runtime.Register("socket", "()Ljava/net/Socket;", "GetSocketHandler")]
public abstract Java.Net.Socket? Socket ();
[<Android.Runtime.Register("socket", "()Ljava/net/Socket;", "GetSocketHandler")>]
abstract member Socket : unit -> Java.Net.Socket

Returns

A socket associated with this channel

Attributes

Remarks

Retrieves a socket associated with this channel.

The returned object will not declare any public methods that are not declared in the java.net.Socket class.

Java documentation for java.nio.channels.SocketChannel.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