qsniffer 0.1.0

Qsniffer is an infrastructure component of the Qexed project, primarily used to validate and test the correctness of packet parsing functions. It's a development assistance tool that helps developers inspect network packet parsing logic.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// 空数据包,处理报错的
#[derive(Debug, Default, PartialEq,Clone)]
pub struct NullPacket {}
impl NullPacket {
    pub fn new() -> Self {
        NullPacket {}
    }
}
impl qexed_tcp_connect::net_types::packet::Packet for NullPacket {
    fn id(&self) -> u32 {
        0xfff
    }
    fn serialize(&self, _w: &mut qexed_tcp_connect::packet::encode::PacketWriter) {}
    fn deserialize(&mut self, _r: &mut qexed_tcp_connect::packet::decode::PacketReader) {}
    fn as_any(&self) -> &dyn std::any::Any {
        self
    }
}