mouse0518 发表于 2009-8-18 12:27:04

Proactor框架中

在Client端的handle_read_stream()得到数据后, 怎么显示在UI上?

winston 发表于 2009-8-18 17:39:59

数据一般推入队列处理。队列处理后,可以发送消息,让UI根据数据更新。

mouse0518 发表于 2009-8-19 15:38:43

那什么时候算读完数据呢?能给我举个例子吗?

winston 发表于 2009-8-19 22:16:24

所谓读完数据,是你自己的定义。比如一条协议包结束了,还是网络中止连接了等。
例子可以参考:
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\Aio_Platform_Test_C.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\post_completions.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\simple_test_proactor.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_aiocb.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_aiocb_ace.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_aiosig.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_aiosig_ace.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_cancel.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_end_event_loop.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_multiple_loops.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_proactor.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_proactor2.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_proactor3.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_timeout.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_timeout_st.cpp
d:\ACE\ACE_wrappers\examples\Reactor\Proactor\test_udp_proactor.cpp

mouse0518 发表于 2009-8-20 16:29:52

Thank you!
页: [1]
查看完整版本: Proactor框架中