Class AFSYSTEMSocketChannel
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.SelectableChannel
java.nio.channels.spi.AbstractSelectableChannel
java.nio.channels.SocketChannel
org.newsclub.net.unix.AFSocketChannel<AFSYSTEMSocketAddress>
org.newsclub.net.unix.darwin.system.AFSYSTEMSocketChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, NetworkChannel, ReadableByteChannel, ScatteringByteChannel, WritableByteChannel, AFSocketExtensions, AFSomeSocket, AFSomeSocketChannel, AFSomeSocketThing, AFSYSTEMSocketExtensions, FileDescriptorAccess
public final class AFSYSTEMSocketChannel
extends AFSocketChannel<AFSYSTEMSocketAddress>
implements AFSYSTEMSocketExtensions
A selectable channel for stream-oriented connecting sockets.
- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class AFSocketChannel
AFSocketChannel.AFSocketSupplier<A>Modifier and TypeClassDescriptionprotected static interfaceA reference to a method that provides anAFSocketinstance. -
Method Summary
Methods inherited from class AFSocketChannel
bind, connect, ensureAncillaryReceiveBufferSize, finishConnect, getAFSocket, getAncillaryReceiveBufferSize, getFileDescriptor, getLocalAddress, getLocalSocketAddress, getOption, getRemoteAddress, getRemoteSocketAddress, implCloseSelectableChannel, implConfigureBlocking, isConnected, isConnectionPending, open, open, open, read, read, setAncillaryReceiveBufferSize, setOption, setShutdownOnClose, shutdownInput, shutdownOutput, socket, supportedOptions, toString, write, writeModifier and TypeMethodDescriptionbind(SocketAddress local) final booleanconnect(SocketAddress remote) final voidensureAncillaryReceiveBufferSize(int minSize) Ensures a minimum ancillary receive buffer size.final booleanprotected final AFSocket<AFSYSTEMSocketAddress> Returns the correspondingAFSocket.final intReturns the size of the receive buffer for ancillary messages (in bytes).final FileDescriptorReturns the correspondingFileDescriptor.final AFSYSTEMSocketAddressfinal AFSYSTEMSocketAddressReturns the socket's local socket address, ornullif unavailable or if there was a problem retrieving it.final <T> TgetOption(SocketOption<T> name) final AFSYSTEMSocketAddressfinal AFSYSTEMSocketAddressReturns the socket's remote socket address, ornullif unavailable/not connected, or if there was a problem retrieving it.protected final voidprotected final voidimplConfigureBlocking(boolean block) final booleanfinal booleanstatic SocketChannelopen(ProtocolFamily family) Opens a socket channel.protected static final <A extends AFSocketAddress>
AFSocketChannel<A> open(AFSocketChannel.AFSocketSupplier<A> supplier) Opens a socket channel.protected static final <A extends AFSocketAddress>
AFSocketChannel<A> open(AFSocketChannel.AFSocketSupplier<A> supplier, SocketAddress remote) Opens a socket channel, connecting to the given socket address.final intread(ByteBuffer dst) final longread(ByteBuffer[] dsts, int offset, int length) final voidsetAncillaryReceiveBufferSize(int size) Sets the size of the receive buffer for ancillary messages (in bytes).final <T> AFSocketChannel<AFSYSTEMSocketAddress> setOption(SocketOption<T> name, T value) voidsetShutdownOnClose(boolean enabled) Configures whether the socket should be shutdown uponCloseable.close(), which is the default.final AFSocket<AFSYSTEMSocketAddress> socket()final Set<SocketOption<?>> final StringtoString()final intwrite(ByteBuffer src) final longwrite(ByteBuffer[] srcs, int offset, int length) Methods inherited from class SocketChannel
open, read, validOps, writeMethods inherited from class AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, registerMethods inherited from class SelectableChannel
registerMethods inherited from class AbstractInterruptibleChannel
begin, close, end, isOpenMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AFSomeSocketChannel
configureBlocking, isBlockingModifier and TypeMethodDescriptionconfigureBlocking(boolean block) Adjusts this channel's blocking mode.booleanChecks if the channel is configured blocking.
-
Method Details
-
open
Opens a socket channel.- Returns:
- The new channel
- Throws:
IOException- on error.
-