上一个项目libevent应该是select,现在libuv是iocp,都知道Windows下iocp比select效率高,boost asio 也是iocp,但具体使用select和iocp发现没有定论,看了云风http://blog.codingnow.com/2006/04/iocp_kque...
分类:
其他好文 时间:
2016-01-24 23:47:04
阅读次数:
202
来自网友天地弦的DIOCP早已经广为人知了,有很多的同学都用上了它,甚至各种变异、修改版本也出了不少。我最近也在学习DIOCP,打算将它用于自己的服务端,今天让我们来一起探密它(DIOCP)的运作核心吧。DIOCP作为对Windows的IOCP完成端口封装,拥有了很高的性能,经过对ECHO示例的测试...
分类:
其他好文 时间:
2016-01-21 00:32:31
阅读次数:
376
要编写高性能的Socket服务器,为每个接收的Socket分配独立的处理线程的做法是不可取的,当连接数量很庞大时,服务器根本无法应付。要响应庞大的连接数量,需要使用IOCP(完成端口)来撤换并处理响应。.net framework的System.Net.Sockets.Socket类有一组xxxAs...
// IOCP2.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include #pragma comment(lib, "WS2_...
最近再看IOCP,结果里面的一个赋值过程,造成了误解。test t1 = new test();test t2 = new test();test t4 = new test();t1= t2;t2 = t3;t3 = null;实际上这个过程,支持栈上t1指向了堆上的t2,t2,指向了t3,t3 ...
转自http://www.cnblogs.com/lancidie/archive/2011/12/19/2293773.html
分类:
其他好文 时间:
2015-08-28 19:06:43
阅读次数:
132
关键词:
no-lock interlocked lock-free tcp/ip socket server engine epoll iocp server out-of-orderexecution无锁 原子锁 原子操作 原子指令 锁无关 开放锁 通讯服务器 引擎 高并发 大数据 搜索引擎 完成端口服务器 cpu乱序并行执行 内存栅栏
IOKING 真正无锁服务器引擎之消...
分类:
其他好文 时间:
2015-08-28 00:57:12
阅读次数:
191
WSAGetLastError为6 http://stackoverflow.com/questions/20526235/wsarecv-sometimes-return-invalid-handle-error-no-6-for-a-socket-associated-w 没有初始化LPOVERLAPPED结构(尤其是hEvent). WSAGetLastErr...
分类:
其他好文 时间:
2015-08-27 02:19:45
阅读次数:
256
转自博客:http://blog.163.com/xhyzdai@126/blog/static/732533112011111544957703error C2065: 'WSASocket' : undeclared identifiererror C2065: 'WSABUF' : undec...
分类:
其他好文 时间:
2015-08-25 18:55:39
阅读次数:
228
最近做一个视频存储服务器。通信模块有几个选择:自己封装IOCP,libevent boost::aio ,ACE。最终还是选择了大名鼎鼎的ACE。结果就是噩梦从此开始了。ACE主要分为3层:OS适配层,wrapper facde层,框架层。OS适配层。封装了藏用的操作系统函数。wrapper fa....
分类:
其他好文 时间:
2015-08-20 20:34:12
阅读次数:
247