|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
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 All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |