-
一个线程池的一个类,基本使用如下:
一个线程驰的类, 下面的是基本的使用方法 struct TSession { SOCKET socket int id } class myIocp:public CIOCP { public: void OnRead(void * p, char * buf, int len) void OnAccept(SOCKET socket) void OnClose(void * p) } void myIocp::OnAccept(SOCKET socket) { TSession *s = new TSession s->socket = socket //这里可以对连接的session进行自己的操作,例如给id找一个唯一的值 SetIoCompletionPort(socket, s) // 使连接socket与一个自定义结构体关联 } void myIocp::OnRead(void * p, char * buf, int len) { TSession *s = (TSession *)p send(s->socket, buf, len, 0) // 这里只是简单的把收到的消息返回给客户端 ... } void myIocp::OnClose(void * p) { delete p } myIoncp iocp main() { ... iocp.listen(4311) // 开始监听网络端口,等待客户端连接 ... }-A class for thread pool,basic usage below:
struct TSession { SOCKET socket int id } class myIocp:public CIOCP
{ public:
void OnRead(void* p, char* buf, int len)
void OnAccept(SOCKET socket)
void OnClose(void* p) }
void myIocp::OnAccept(SOCKET socket)
{ TSession*s = new TSession s->socket = socket
//here you can do something about connecti
- 2022-07-17 05:14:52下载
- 积分:1
-
C# 自动切换SQLite32位64位dll
System.Data.SQLite.DLL分32位和64位的版本,不需要分别生成x86和x64应用程序,该实例代码基于sqlite.dll 1.0.65.0版本
- 2022-07-16 08:47:00下载
- 积分:1
-
It is a development of the VC document comparison tool, as useful as Windiff.
这是一个有VC开发的文件比较工具,就像Windiff一样好用。-It is a development of the VC document comparison tool, as useful as Windiff.
- 2022-03-24 18:00:58下载
- 积分:1
-
代码1:本代码实现了以图形方式显示CPU与内存利用率。 代码2:近来我在用VC开发一套MIS时没有用MFC的文档视图模板,所以在打印这上面就只好自己写了一套,用...
代码1:本代码实现了以图形方式显示CPU与内存利用率。 代码2:近来我在用VC开发一套MIS时没有用MFC的文档视图模板,所以在打印这上面就只好自己写了一套,用起来感觉还可以,所以写出来大家一起修正一下吧,也许能给大家起点作用吧! 系统UI是基于对话框的,大家如果感觉不错可以进行自我修正! 代码3:编程时有时需要读取SQL服务器的目录及文件列表,特别作一些数据库备份程序的时候,本程序实现这个功能...... 代码4:TTS-文本语音转换。 代码5:本软件是一个用局网域发送信使服务的程序,用到了NET SEND网络命令和创建了一个进程和一个主线程。本软件一共两个线程,显示网络用户信息也用到了第二个线程主要用到的是NETBIOS会话。本程序是发布的DEBUG版如果有什么DEBUG请指出。本程序参考了VISUAL C++网络通信编程一书。 代码6:数据库连接 AD0。本包为数据连接,在您的程序中整体加入此包能帮您的数据库连接省n多代码 里面注释很规范, 请自己阅读。-a code : the source implementation of a graphic display of CPU and memory utilization. Code 2 : Recently, I developed a VC MIS without using MFC View template files, so that the print on the above but their set was used up feeling also, so we write together that so much today, we can perhaps starting role! UI system is based on then the box, if you can feel good for self-correction! code 3 : Programming sometimes need to read SQL server"s directory and list of documents, especially for some database backup procedures, the procedures for this function co
- 2022-03-24 19:05:28下载
- 积分:1
-
dm9000.c driven by the embedded development, DM9000. Development board
d.m.9000.c 驱动,嵌入式开发用的,DM9000。开发板-dm9000.c driven by the embedded development, DM9000. Development board
- 2022-09-04 03:50:03下载
- 积分:1
-
进程管理系统创建调度通信撤消可监控驱动程序开发
进程管理系统创建调度通信撤消可监控驱动程序开发
-process management system to create scheduling withdrawal of monitoring communications Driver Development
- 2022-01-25 22:12:41下载
- 积分:1
-
标题栏画标题栏
采用VC++ MFC开发,实现位图自绘标题栏。在函数中PreCreateWindow取消Title Bar上的按钮,DrawTitleBar函数中重绘标题栏,非常有参考价值。
- 2022-07-21 20:15:44下载
- 积分:1
-
Visual C preparation, data structure operations, 2 1 yuan polynomial combined so...
windows编程工具Visual C++编写,数据结构作业,两个一元多项式相加源程序,多项式的系数coef是float型; 多项式的指数expn是int 型 ;-Visual C preparation, data structure operations, 2 1 yuan polynomial combined source, the polynomial coefficients is Coef float; Polynomial index expn is int type;
- 2022-03-21 02:31:09下载
- 积分:1
-
用evc编写的WindowsCE.net下的注册表编辑程序的源代码
用evc编写的WindowsCE.net下的注册表编辑程序的源代码-an regeditor source code developed by evc for WindowsCE.net
- 2022-05-04 23:46:02下载
- 积分:1
-
关于SVM的一些相关程序,个人觉得很好
关于SVM的一些相关程序,个人觉得很好-SVM on the relevant procedures, personal feel very good
- 2023-06-23 20:05:05下载
- 积分:1