这两种方法有什么区别:
进程包:
PacketListener pListener = new PacketListener() {
@Override
public void processPacket(Packet packet) {
if(packet instanceof Presence) {
//..
}
}
};
并接受:
PacketFilter pFilter = new PacketFilter() {
@Override
public boolean accept(Packet packet) {
return true;
}
};
他们不能做同样的事情吗?
笔记 :
con.addPacketListener(pListener, pFilter);