Freigeben über


DatagramSocket.Channel Property

Definition

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

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

Property Value

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

Attributes

Remarks

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

A datagram socket will have a channel if, and only if, the channel itself was created via the java.nio.channels.DatagramChannel#open DatagramChannel.open method.

Added in 1.4.

Java documentation for java.net.DatagramSocket.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