<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_深圳夜归人</title><subtitle type="text">繁华的都市，有谁记得我们的脚步？</subtitle><id>http://feed.cnblogs.com/blog/u/8509/rss</id><updated>2007-08-11T11:25:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/8509/rss"/><entry><id>http://www.cnblogs.com/cpunion/archive/2005/09/16/238575.html</id><title type="text">使用dpkt和pcap抓包</title><summary type="text">importdpkt,pcappc=pcap.pcap()pc.setfilter('tcp')forts,pktinpc:p=dpkt.ethernet.Ethernet(pkt)ifp.data.__class__.__name__=='IP':ip='%d.%d.%d.%d'%tuple(map(ord,list(p.data.dst)))data=p.data.dataifdata.__c...</summary><published>2005-09-16T10:15:00Z</published><updated>2005-09-16T10:15:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/09/16/238575.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/09/16/238575.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/09/14/237053.html</id><title type="text">[收藏] jfwan实现的一个C++委托类</title><summary type="text">http://blog.donews.com/jfwan/archive/2005/07/01/451082.aspx接口实现很完整，对象生存期管理也比较好，代码短小。什么时候标准C++支持委托就好了，好像C++0x中还没看到这个。从jfwan的代码里，也发现了一个我一直以来的理解错误：void返回值的函数，可以使用return void();，我从没见过这种用法，所以理所当然觉得它是非法的，直观...</summary><published>2005-09-14T12:11:00Z</published><updated>2005-09-14T12:11:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/09/14/237053.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/09/14/237053.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/09/03/229557.html</id><title type="text">[c++] c++0x中的auto和typeof</title><summary type="text">c++0x keynote中包含一个重要的typeof表达式，用以“自动获取一个类型”，当然是编译期。一、基本用法。1、typeof表达式。以下是它列出的用法：a、取表达式的值的类型：template&amp;lt;class A, class B&amp;gt;function operator*(A a, B b) -&amp;gt; typeof(a*b); // return type last// big ch...</summary><published>2005-09-03T12:15:00Z</published><updated>2005-09-03T12:15:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/09/03/229557.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/09/03/229557.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/30/226374.html</id><title type="text">ACE_TP_Reactor的限制</title><summary type="text">仔细研究了一下，如果要使用ACE_TP_Reactor，则不宜对同一个ACE_Event_Handler同时注册SOCKET和其它事件，因为ACE_TP_Reactor只保证“不会有2个线程同时调用同一个Event_Handler的SOCKET事件处理器”。上次我修改了一个版本，让它能同时处理SOCKET事件和TIMER事件，不过在压力测试下还是出了问题。原因是当客户端主动断线时，peer().g...</summary><published>2005-08-30T10:02:00Z</published><updated>2005-08-30T10:02:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/30/226374.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/30/226374.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/28/224664.html</id><title type="text">ACE_SOCK_Stream send和recv超时设置</title><summary type="text">看到很多地方都使用下面的方式来表示不等待：ACE_Time_Value nowait (ACE_OS::gettimeofday());peer ().send (..... &amp;amp;nowait);这包括马维达译的《ACE程序员指南》。上次测试了一下，证实这个用法是错误的，可以做一个简单的测试环境：写一个简单的echo服务器，服务端收到数据以后sleep几秒再写回peer，而客户端则在发送数据...</summary><published>2005-08-28T09:04:00Z</published><updated>2005-08-28T09:04:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/28/224664.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/28/224664.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/24/222182.html</id><title type="text">哀悼18位在车祸中死去的人</title><summary type="text">2005年8月23日晚8时，深圳市宝安区龙华段发生建市以来最大一起车祸，死18人，伤17人。心痛! 心痛!好好的人一下子就没了。司机肯定是有责任的，躲避单车是正确的，但那种情况下没有刹车肯定不正常。他也赔不起18条人命，世界上没有人能赔得起别人的命。那位骑单车的，现在可能没办法知道他当时是不是闯红灯，也不知道那里有没有红灯。在深圳行人闯红灯是比较普遍的现象，似乎每个人都只在乎那几秒时间。追究责任也...</summary><published>2005-08-24T15:00:00Z</published><updated>2005-08-24T15:00:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/24/222182.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/24/222182.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/09/210941.html</id><title type="text">对ACE_TP_Reactor定时器处理机制做一点修改。</title><summary type="text">ACE_TP_Reactor保证同一处理器(Handle)的SOCKET事件，在同一时间不会由多个线程同时调用，但并没有保证多个线程不在同一时间分别处理同一处理器(Handle)的SOCKET和定时器，而且如果在定时器处理中超过定时器间隔，将会有另一线程再次调用定时器处理函数，带来不必要的线程同步工作。通过查看源码（TP_Reactor.cpp）可以看出，当处理一个SOCK事件时，TP_React...</summary><published>2005-08-09T09:14:00Z</published><updated>2005-08-09T09:14:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/09/210941.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/09/210941.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/07/209401.html</id><title type="text">C++编写“异步调用代理组件”的一点想法</title><summary type="text">注：里面使用了一个自己写的C++委托类Delegate，不是.net中的委托，关于这个委托详见我的C++委托类最终版。本文所写的代码是跨平台的纯C++实现。一、简要说明。这里讲的“异步调用代理组件”，简要描述如下。假如有一个耗时的方法(不论它是本地调用还是远程调用)，这个调用耗时的原因是由于某些原因的阻塞，比如IO，通常可以把这个操作交给一个线程去处理，为了通用、高效，往往会实现一个领导者/追随者...</summary><published>2005-08-07T08:32:00Z</published><updated>2005-08-07T08:32:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/07/209401.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/07/209401.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/02/205730.html</id><title type="text">有趣的东西：Test () () () () () () () () () ();</title><summary type="text">上次写给一个朋友看的。#include &amp;lt;iostream&amp;gt;using namespace std;struct Test{Test&amp;amp; operator ( ) ( ){cout &amp;lt;&amp;lt; "当";return *this;}};int main(){Test () () () () () () () () () ();cout &amp;lt;&amp;lt; endl;cout &amp;...</summary><published>2005-08-02T08:05:00Z</published><updated>2005-08-02T08:05:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/02/205730.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/02/205730.html"/></entry><entry><id>http://www.cnblogs.com/cpunion/archive/2005/08/02/205621.html</id><title type="text">VC2005 Beta 2 模板偏特化有些问题</title><summary type="text">看下面的输出就知道，其实就是定义了一个Delegate&amp;lt;void(int,int)&amp;gt;：1&amp;gt;c:\documents and settings\administrator\my documents\visual studio 2005\projects\delegate\delegate\call.h(74) : error C2752: 'Delegate&amp;lt;T&amp;gt;' :...</summary><published>2005-08-02T06:43:00Z</published><updated>2005-08-02T06:43:00Z</updated><author><name>cpunion</name><uri>http://www.cnblogs.com/cpunion/</uri></author><link rel="alternate" href="http://www.cnblogs.com/cpunion/archive/2005/08/02/205621.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/cpunion/archive/2005/08/02/205621.html"/></entry></feed>
