common.h源文件分析

来源:互联网 发布:四川省扶贫数据 编辑:程序博客网 时间:2024/06/09 19:33

GeneralException类:其中StreamException继承自GeneralException,而SockExceptionEOFExceptionCryptExceptionTimeoutException均从StreamException继承

GnuID、GnuIDList、Host类

GnuID是唯一标识GnuPacket的ID号。由16位组成

主要方法有

void generate(unsigned char = 0);   //通过随机数生成Brocast ID号
void encode(class Host *, const char *,const char *,unsigned char); //通过IP地址和其他数据对ID进行重新编码

GnuIDList维护一个GnuID的链表

Host类用于对主机IP地址、端口号的处理

原创粉丝点击