public class Channel extends Object
限定符和类型 | 字段和说明 |
---|---|
protected Map<String,Queue<ByteBuffer>> |
msgMap |
protected Map<String,MessageParser> |
parserMap |
构造器和说明 |
---|
Channel() |
限定符和类型 | 方法和说明 |
---|---|
protected String |
deviceKey(String ip,
int port)
设备的key
|
protected void |
notifyConnect(String ip,
int port) |
protected void |
onReadable(SelectableChannel channel) |
protected void |
onReadError(String ip,
int port)
读取错误
|
protected int |
onWritable(SelectableChannel channel) |
protected Map<String,Queue<ByteBuffer>> msgMap
protected Map<String,MessageParser> parserMap
protected int onWritable(SelectableChannel channel)
protected void onReadable(SelectableChannel channel)
protected void onReadError(String ip, int port)
ip
- ipport
- portprotected void notifyConnect(String ip, int port)
Copyright © 2023. All rights reserved.