Proactor框架中
在Client端的handle_read_stream()得到数据后, 怎么显示在UI上? 数据一般推入队列处理。队列处理后,可以发送消息,让UI根据数据更新。 那什么时候算读完数据呢?能给我举个例子吗? 所谓读完数据,是你自己的定义。比如一条协议包结束了,还是网络中止连接了等。例子可以参考:
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 Thank you!
页:
[1]