다음을 통해 공유


Socket.Channel Property

Definition

Returns the unique java.nio.channels.SocketChannel SocketChannel object associated with this socket, if any.

public virtual Java.Nio.Channels.SocketChannel? Channel { [Android.Runtime.Register("getChannel", "()Ljava/nio/channels/SocketChannel;", "GetGetChannelHandler")] get; }
[<get: Android.Runtime.Register("getChannel", "()Ljava/nio/channels/SocketChannel;", "GetGetChannelHandler")>]
member this.Channel : Java.Nio.Channels.SocketChannel

Property Value

the socket channel associated with this socket, or null if this socket was not created for a channel

Attributes

Remarks

Returns the unique java.nio.channels.SocketChannel SocketChannel object associated with this socket, if any.

A socket will have a channel if, and only if, the channel itself was created via the java.nio.channels.SocketChannel#open SocketChannel.open or java.nio.channels.ServerSocketChannel#accept ServerSocketChannel.accept methods.

Added in 1.4.

Java documentation for java.net.Socket.getChannel().

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