public class ClientChannel extends ChannelBase implements Channel
| 构造器和说明 |
|---|
ClientChannel(ClientInternal client,
ClientConnector connector) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close(int code)
关闭
|
void |
connect()
连接
|
long |
getLiveTime()
最后活动时间
|
InetSocketAddress |
getLocalAddress()
获取本地地址
|
InetSocketAddress |
getRemoteAddress()
获取远程地址
|
Session |
getSession()
获取会话
|
int |
isClosed()
是否已关闭
|
boolean |
isClosing()
是否正在关闭
|
boolean |
isValid()
是否有效
|
void |
onError(Throwable error)
出错时
|
void |
reconnect()
重新连接
|
void |
retrieve(Frame frame,
StreamInternal stream)
接收(接收答复帧)
|
void |
send(Frame frame,
StreamInternal stream)
发送
|
getAttachment, getConfig, getHandshake, putAttachment, sendAlarm, sendClose, sendConnack, sendConnect, sendPing, sendPong, setHandshakeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttachment, getConfig, getHandshake, putAttachment, sendAlarm, sendClose, sendConnack, sendConnect, sendPing, sendPong, setHandshakepublic ClientChannel(ClientInternal client, ClientConnector connector)
public long getLiveTime()
ChannelgetLiveTime 在接口中 Channelpublic InetSocketAddress getRemoteAddress() throws IOException
getRemoteAddress 在接口中 ChannelIOExceptionpublic InetSocketAddress getLocalAddress() throws IOException
getLocalAddress 在接口中 ChannelIOExceptionpublic void send(Frame frame, StreamInternal stream) throws IOException
send 在接口中 Channelframe - 帧stream - 流(没有则为 null)IOExceptionpublic void retrieve(Frame frame, StreamInternal stream)
public void close(int code)
close 在接口中 Channelclose 在类中 ChannelBasepublic Session getSession()
getSession 在接口中 Channelpublic void reconnect()
throws IOException
reconnect 在接口中 ChannelIOExceptionpublic void connect()
throws IOException
IOExceptionCopyright © 2024. All rights reserved.