1. 要点回顾
* SendData/ReceiveData的本质:
SendData=Main thread向network thread发送(PostEvent)一个CRtEventSendData;在CRtEventSendData::OnEventFire中,network thread通过socket送出
ReceiveData=network thread从socket接收数据,向main thread发送(PostEvent)一个CRtEventOnReceive;main thread在CRtEventOnReceive::OnEventFire中,适当方法处理,直到CConference对象及之上
注:XXXEvent是系统处理的核心
* 发送与接收的区别
发送的时候,有若干”策略“需要实施,如优先级(CConfConnection),UDP/TCP选择(CConfPort)
接收的时候,无对应策略
2. 问题汇总
Q:CConference::UpdateSessionChannel究竟完成什么功能?
Q:CConference/CConfSession等对象只会出现在main thread的执行中,不会出现在network thread中,对吗?
Q:CConference到底有没有直接与Server通讯的能力?
A:I think no. CConference存在于main thread的context中,必须通过向network thread发送PostEvent方式来向Server发送信息。
跟踪分析CConference::SendData,结果如何?
CConference -> CConfPort -> CConfConnection -> CRtIMConnection -> CRtTransportTcpT
Q:似乎直接就把pdu发给server了,没有通过pReactor->PostEvent()?
Q:或者network thread中也有CConference对象?不太可能吧?
Q:所有数据(a/v/d都表现为Event)?所有数据的收发都表现为event的Post?
3. 下步计划
4. 杂想杂问
5. Jiarong的代码
E/// D2的代码为何不能直接看到UI?
chat与另一客户端似乎不通?