Package io.netty.channel.socket
Interface SocketChannel
-
- All Superinterfaces:
AttributeMap,Channel,ChannelOutboundInvoker,java.lang.Comparable<Channel>,DuplexChannel
- All Known Implementing Classes:
EpollSocketChannel,IoUringSocketChannel,KQueueSocketChannel,NioSocketChannel,OioSocketChannel
public interface SocketChannel extends DuplexChannel
A TCP/IP socketChannel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SocketChannelConfigconfig()Returns the configuration of this channel.java.net.InetSocketAddresslocalAddress()Returns the local address where this channel is bound to.ServerSocketChannelparent()Returns the parent of this channel.java.net.InetSocketAddressremoteAddress()Returns the remote address where this channel is connected to.-
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
Methods inherited from interface io.netty.channel.Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isActive, isOpen, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from interface io.netty.channel.socket.DuplexChannel
isInputShutdown, isOutputShutdown, isShutdown, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutput
-
-
-
-
Method Detail
-
parent
ServerSocketChannel parent()
Description copied from interface:ChannelReturns the parent of this channel.
-
config
SocketChannelConfig config()
Description copied from interface:ChannelReturns the configuration of this channel.
-
localAddress
java.net.InetSocketAddress localAddress()
Description copied from interface:ChannelReturns the local address where this channel is bound to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
localAddressin interfaceChannel- Returns:
- the local address of this channel.
nullif this channel is not bound.
-
remoteAddress
java.net.InetSocketAddress remoteAddress()
Description copied from interface:ChannelReturns the remote address where this channel is connected to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
remoteAddressin interfaceChannel- Returns:
- the remote address of this channel.
nullif this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g.DatagramChannel, useDefaultAddressedEnvelope.recipient()to determine the origination of the received message as this method will returnnull.
-
-