public interface SocketChannel extends DuplexChannel
Channel 。
Channel.Unsafe| Modifier and Type | Method and Description |
|---|---|
SocketChannelConfig |
config()
返回此频道的配置。
|
java.net.InetSocketAddress |
localAddress()
返回此通道绑定的本地地址。
|
ServerSocketChannel |
parent()
返回此频道的父级。
|
java.net.InetSocketAddress |
remoteAddress()
返回此通道连接到的远程地址。
|
isInputShutdown, isOutputShutdown, isShutdown, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutputalloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, pipeline, read, unsafeattr, hasAttrbind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlushServerSocketChannel parent()
Channel
SocketChannelConfig config()
Channel
java.net.InetSocketAddress localAddress()
Channel复制的描述
SocketAddress应该被转换为更具体的类型,例如InetSocketAddress来检索详细信息。
localAddress接口
Channel
null如果此通道未绑定。
java.net.InetSocketAddress remoteAddress()
Channel
SocketAddress应该被放入更具体的类型,例如InetSocketAddress以检索详细信息。
remoteAddress在界面
Channel
null如果此通道未连接。
如果此通道未连接,但它可以接收来自任意远程地址的消息(例如DatagramChannel ,请使用DefaultAddressedEnvelope.recipient()来确定接收消息的来源,因为此方法将返回null 。
Copyright © 2008–2018 The Netty Project. All rights reserved.