摘要:
这三个函数都可以创建新的线程,但都是如何创建的呢?当然MSDN文档最权威:Creates a thread to execute within the virtual address space of the calling process.在调用进程的虚拟地址空间里创建一个线程用CreateThread;To create a thread that runs in the virtual address space of another process, use theCreateRemoteThreadfunction.如果在另一进程的虚拟地址空间创建线程用CreateRemoteThr 阅读全文
posted @ 2013-09-16 17:57
hailong
阅读(925)
评论(0)
推荐(0)
摘要:
服务器端对一个客户端来了就开启一个工作线程,最多可接受64个。具体看代码:#pragma once#include #include #pragma comment(lib, "ws2_32.lib")#define MaxClient 64class MyTCPSocket{public: MyTCPSocket(void); ~MyTCPSocket(void); bool Init(); bool UnInit(); bool CreateSocket(); bool Bind(unsigned aPost,const char* aAdress); ... 阅读全文
posted @ 2013-09-16 15:07
hailong
阅读(527)
评论(0)
推荐(0)

浙公网安备 33010602011771号