|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IParser
packet parser 包解析器
Method Summary | |
---|---|
boolean |
accept(ByteBuffer buf)
judge parser whether can deal with this packet, judge can not touch buf pointer position 判断此parser是否可以处理这个包,判断不能影响到buf的指针位置 |
PacketHistory |
getHistory()
|
int |
getLength(ByteBuffer buf)
|
boolean |
isDuplicate(InPacket in)
checkout this input packet whether is duplicate 检查这个输入包是否重复 |
boolean |
isDuplicatedNeedReply(InPacket in)
|
InPacket |
parseIncoming(ByteBuffer buf,
int length,
QQUser user)
parse a input packet object from buf current position, complete pointer is after length 从buf当前位置解析出一个输入包对象,解析完毕后指针位于length之后 |
OutPacket |
parseOutcoming(ByteBuffer buf,
int length,
QQUser user)
parse a output packet object from buf current position, complete pointer is after length 从buf当前位置解析出一个输出包对象,解析完毕后指针位于length之后 |
int |
relocate(ByteBuffer buf)
suppose buff current position is a packet, return initial position of next packet. |
Method Detail |
---|
boolean accept(ByteBuffer buf)
buf
- ByteBuffer
int getLength(ByteBuffer buf)
buf
- TODO
InPacket parseIncoming(ByteBuffer buf, int length, QQUser user) throws PacketParseException
buf
- ByteBufferlength
- packet length
包长度user
- QQ user object
QQ用户对象
PacketParseException
OutPacket parseOutcoming(ByteBuffer buf, int length, QQUser user) throws PacketParseException
buf
- ByteBufferlength
- packet length
包长度user
- QQ user object
QQ用户对象
PacketParseException
boolean isDuplicate(InPacket in)
in
-
boolean isDuplicatedNeedReply(InPacket in)
in
- received packet
收到的包
int relocate(ByteBuffer buf)
buf
- ByteBuffer
PacketHistory getHistory()
|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |