-
Csharp IOCP
C#高性能的Socket服务器,实测服务器端支持6w个连接100客户 100,000(十万次)不间断的发送接收数据(发送和接收之间没有Sleep,就一个一循环,不断的发送与接收)耗时3004.6325 秒完成总共 10,000,000 一千万次访问平均每分完成 199,691.6 次发送与接收平均每秒完成 3,328.2 次发送与接收
- 2022-12-26 03:10:04下载
- 积分:1
-
八皇后VC图形演示,算法思想:回溯法,先在第1行放上一个皇后,然后在第2行合适的位置放上一个皇后,依次类推,如果8行都放满了,说明找到了一个解,如果第好第i行的...
八皇后VC图形演示,算法思想:回溯法,先在第1行放上一个皇后,然后在第2行合适的位置放上一个皇后,依次类推,如果8行都放满了,说明找到了一个解,如果第好第i行的皇后后,第i+1行找不到合适的位置,这时就回到第i行,把第i行的皇后放到下一个位置,继续尝试下一行。如此反复,知道找到所有的解。注意,这种算法找的解可能有等价的,某些解可由别的解经过旋转棋盘得到。-visual demostration in vc of eight queens problem.
algorithm: backtracking.
First, put a queen on first line then find a suitable position on 2nd line for next queen, and so on. When all eight lines have queens, it means we have find a solution. If we put the i-th queen, but can find a suitable position on the (i+1)th line, then back to the ith line and move the queen on the ith line to next suitable position and move on to the next line. Repeat this until we have found all the solutions. Note:By this mean, some solutions maybe equivalent to others, some can be acquired by the rotation of other solutions.
- 2022-03-23 15:20:19下载
- 积分:1
-
一个线程池的一个类,基本使用如下:
一个线程驰的类, 下面的是基本的使用方法 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
-
VC图灵机示范程序
VC图灵机示范程序-VC Turing Machine model procedures
- 2022-08-14 02:27:37下载
- 积分:1
-
Bug Free is a very good tool for defect management. I hope you like.
Bug Free是一款非常好的缺陷管理工具。希望大家喜欢。-Bug Free is a very good tool for defect management. I hope you like.
- 2022-06-30 07:54:13下载
- 积分:1
-
自动反击
自动反击---浏览器标题被改,首页被改软件-automatically counterattack--- browser title was changed, a change software Home
- 2022-02-06 19:19:52下载
- 积分:1
-
C++ Builder与Windows API经典范例
C++ Builder与Windows API经典范例-C Builder and Windows API classic model
- 2022-03-06 15:59:29下载
- 积分:1
-
Online Criminal Tracking Website.
Online Criminal Tracking Website.
- 2022-04-15 22:48:21下载
- 积分:1
-
用vc++实现Direct 3D中的粒子系统。调试环境:Win XP;VC++ 6.0
用vc++实现Direct 3D中的粒子系统。调试环境:Win XP;VC++ 6.0 -Using vc++ to achieve in the Direct 3D particle system. Debugging environment: Win XP VC++ 6.0
- 2022-02-06 16:47:47下载
- 积分:1
-
自己做的一个提取硬件信息的工程
自己做的一个提取硬件信息的工程-Own to do a hardware information extraction projects
- 2022-07-19 17:09:09下载
- 积分:1