转自:http://blog.csdn.net/zzhboy/article/details/9878941
下面我们就正式开始客户端的搭建 首先我献给大家画一张我的客户端实现的流程图
我PS 画的大家不要见怪啊 不过流程就是这样的

搭建看到我上面的框架图的时候 就知道我的大概设计思路,
boy 在这里强调一点 这个是用异步的结构实现 其中线程类 我是参照java 里面的方法。
好了废话不多 首先先上 BSD SOCKET 这个核心类
- /*
- * define file about portable socket class.
- * description:this sock is suit both windows and linux
- * design:odison
- * e-mail:odison@126.com>
- *
- */
- #ifndef _ODSOCKET_H_
- #define _ODSOCKET_H_
- #ifdef WIN32
- #include <winsock2.h>
- typedef int socklen_t;
- #else
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
- #include <fcntl.h>
- #include <unistd.h>
1408


客户端实战篇&spm=1001.2101.3001.11974&articleId=87012259&d=1&t=3&u=72938bac1de74e5baa321ff635f2adb8)

被折叠的 条评论
为什么被折叠?



