字体:  

ACE_Proactor怎么用它的多个实例啊?

jolly_w23 发表于: 2008-5-29 17:22 来源: ACE 开发者

ACE_WIN32_Proactor* impl = new ACE_WIN32_Proactor( 0 , 1 );
ACE_Proactor proactor_impl( impl , 1 );
Sender sender( file_.c_str() );
if (sender.open ( host_.c_str() , port_ ) == -1)
  return -1;
int success = 1;
while ( success > 0  && ! Sender::done_ )
  success = proactor_impl.handle_events ();
Sender::done_ = 0;
proactor_impl.close();
delete impl ;
return 0;

第一次就阻在handle_events()里头了.不知道该怎么用ACE_Proactor的实例.用ACE_Proactor::instance()好好的 .高手帮下忙.谢谢.

[ 本帖最后由 jolly_w23 于 2008-5-29 17:24 编辑 ]

最新回复

winston at 2008-5-29 22:25:20
不要重复发帖。
你还没理解Proactor,先看看卷2再来,就不会问这个问题了。
不是这样用。