========================================================================
CONSOLE APPLICATION : TestIOCP
========================================================================
AppWizard has created this TestIOCP application for you.
This file contains a summary of what you will find in each of the files that
make up your TestIOCP application.
TestIOCP.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
TestIOCP.cpp
This is the main application source file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named TestIOCP.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
int main(int argc, char* argv[]) { int nPort = 4567; //创建完成端口对象 HANDLE hCompletion = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0); ::CreateThread(NULL, 0, ServerThread, (LPVOID)hCompletion, 0, 0); //创建监听套接字 SOCKET sListen = ::socket(AF_INET, SOCK_STREAM, 0); SOCKADDR_IN si; si.sin_family = AF_INET; si.sin_port = ::ntohs(nPort); si.sin_addr.S_un.S_addr = INADDR_ANY; ::bind(sListen, (sockaddr*)&si, sizeof(si)); ::listen(sListen, 5); //循环处理到来的连接
资源推荐
资源详情
资源评论
收起资源包目录
IOCP测试.rar (11个子文件)
TestIOCP
StdAfx.cpp 295B
TestIOCP.cpp 3KB
TestIOCP.opt 53KB
TestIOCP.ncb 49KB
InitSock.h 586B
TestIOCP.dsp 5KB
InitSock.cpp 611B
ReadMe.txt 1KB
StdAfx.h 769B
TestIOCP.plg 1KB
TestIOCP.dsw 541B
共 11 条
- 1
资源评论
- PUXIN122014-09-01一个小demo,可以用,关键部分也有说明,不过5分也太贵了吧
- charllezhou2013-04-18不错,可以借鉴
- champ40772015-05-08初级,整合我意
MOP519475552
- 粉丝: 9
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功