02 2011 档案
[转]How to support 10,000 or more concurrent TCP connections
摘要:http://www.serverframework.com/asynchronousevents/2010/10/how-to-support-10000-concurrent-tcp-connections.html Using a modern Windows operating system it's pretty easy to build a server system that can support many thousands of connections if you design the system to use the correct Windows APIs 阅读全文
posted @ 2011-02-22 20:01 陈峰 阅读(258) 评论(0) 推荐(0)
[转]TCP TIME_WAIT状态
摘要:转自:http://www.cnblogs.com/jason-jiang/archive/2006/11/03/549337.htmlTCP TIME_WAIT状态关键词: TIME_WAIT SO_REUSEADDR Q: 我正在写一个unix server程序,不是daemon,经常需要在命令行上重启它,绝大 多数时候工作正常,但是某些时候会报告"bind: address in use",于是重启失 败。 A: Andrew Gierth server程序总是应该在调用bind()之前设置SO_REUSEADDR套接字选项。至于 TIME_WAIT状态,你无法避免 阅读全文
posted @ 2011-02-12 14:23 陈峰 阅读(220) 评论(0) 推荐(0)
[转] 小议游戏服务器的消息组包
摘要:本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/evilswords/archive/2010/09/01/5855572.aspx为何要组包首先一个原因避免读写频率瓶颈:不管百兆还是千兆网卡,消息的收发对通讯io的调用都会产生中断,而这个中断限制了每秒不能无限制的写入/读出,目前网卡抛开系统和cpu瓶颈驱动级的测试瓶颈是60w/s,而笔者所用ace通讯框架在windows平台下按前摄器(proactor)模式封装的测试,读写瓶颈在接近10w/s。假设针对某个socket每秒有300条写入消息(这个数字在广播范围内密集战斗中还属中等要求),那么抛开消息大小来说, 阅读全文
posted @ 2011-02-11 20:44 陈峰 阅读(460) 评论(0) 推荐(0)
[转]游戏服务器网络带宽负载计算
摘要:Author: FreeKnightDuzhi转自:http://hi.baidu.com/freedomknightduzhi/blog/item/5e8e7f3df775beff3c6d970d.html家庭所安装的4M,8M宽带。其中M是指,Mbits/S其中要提前说明的是:8bits = 1Byte 即8位等于1字节。我们硬盘大小50G。意思是50*1024M字节,约为 50000多字节。但是网宽是以“位”为单位的,所以,8Mbits就是1M字节。是容积体积的单位。8Mbits/s后面的S是秒。8Mbits/s意思是 每秒8M位,即每秒1M字节。 阅读全文
posted @ 2011-02-11 20:43 陈峰 阅读(1837) 评论(0) 推荐(0)