SocketChannel Class
Definition
Assembly:Mono.Android.dll
A SocketChannel is a selectable channel that provides a partial
abstraction of stream connecting socket.
In this article
[Android.Runtime.Register("java/nio/channels/SocketChannel", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class SocketChannel : Java.Nio.Channels.Spi.AbstractSelectableChannel, IDisposable, Java.Nio.Channels.IByteChannel, Java.Nio.Channels.IGatheringByteChannel, Java.Nio.Channels.IScatteringByteChannel
type SocketChannel = class
inherit AbstractSelectableChannel
interface IByteChannel
interface IReadableByteChannel
interface IChannel
interface ICloseable
interface IJavaObject
interface IDisposable
interface IWritableByteChannel
interface IGatheringByteChannel
interface IScatteringByteChannel
Remarks
Portions of this page are modifications based on work created and shared by the
Constructors
A constructor used when creating managed representations of JNI objects; called by the runtime.
Properties
Returns the unique instance of Class that represents this
object's class.
(Inherited from Object)
The handle to the underlying Android instance.
(Inherited from Object)
Indicates whether this channel is in blocking mode.
(Inherited from AbstractSelectableChannel)
Indicates whether this channel's socket is connected.
Indicates whether this channel's socket is still trying to connect.
Returns true if this channel is open.
(Inherited from AbstractInterruptibleChannel)
Indicates whether this channel is registered with one or more selectors.
(Inherited from AbstractSelectableChannel)
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
Methods
Indicates the beginning of a code section that includes an I/O operation
that is potentially blocking.
(Inherited from AbstractInterruptibleChannel)
Gets the object used for the synchronization of register and
configureBlocking.
(Inherited from AbstractSelectableChannel)
Creates and returns a copy of this Object.
(Inherited from Object)
Closes an open channel.
(Inherited from AbstractInterruptibleChannel)
Sets the blocking mode of this channel.
(Inherited from AbstractSelectableChannel)
Connects this channel's socket with a remote address.
(Inherited from Object)
Indicates the end of a code section that has been started with
begin() and that includes a potentially blocking I/O operation.
(Inherited from AbstractInterruptibleChannel)
Compares this instance with the specified object and indicates if they
are equal.
(Inherited from Object)
Completes the connection process initiated by a call of connect(SocketAddress).
Returns an integer hash code for this object.
(Inherited from Object)
Implements the channel closing behavior.
(Inherited from AbstractSelectableChannel)
Implements the closing function of the SelectableChannel.
(Inherited from AbstractSelectableChannel)
Implements the configuration of blocking/non-blocking mode.
(Inherited from AbstractSelectableChannel)
Invoked when the garbage collector has detected that this instance is no longer reachable.
(Inherited from Object)
Gets this channel's selection key for the specified selector.
(Inherited from AbstractSelectableChannel)
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
(Inherited from Object)
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
(Inherited from Object)
Creates an open and unconnected socket channel.
Creates a socket channel and connects it to a socket address.
Returns the selector provider that has created this channel.
(Inherited from AbstractSelectableChannel)
Reads bytes from this socket channel into the given buffer.
Reads bytes from this socket channel and stores them in the specified
array of buffers.
Reads bytes from this socket channel into a subset of the given buffers.
Registers this channel with the specified selector for the specified
interest set.
(Inherited from SelectableChannel)
Registers this channel with the specified selector for the specified
interest set.
(Inherited from AbstractSelectableChannel)
Returns the socket assigned to this channel, which does not declare any public
methods that are not declared in Socket.
Returns a string containing a concise, human-readable description of this
object.
(Inherited from Object)
Gets the valid operations of this channel.
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
(Inherited from Object)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
(Inherited from Object)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
(Inherited from Object)
Writes bytes from the given byte buffer to this socket channel.
Writes bytes from all the given byte buffers to this socket channel.
Attempts to write a subset of the given bytes from the buffers to this
socket channel.
Explicit Interface Implementations
Extension Methods
Applies to