阅读文档:《Server详细设计》及代码 ----- 此文档极其有用
1. IMcs::SendData?
Q:以下函数的功能到底是什么?
virtual RtResult SendData(IInfoSvrPort* pSrcPort,
const CInfoSID& destInfoSID,
CRtMessageBlock& Data,
DATAFLAG DataFlag = DATA_FLAG_COMMAND,
DATA_Priority DataPriority = DATA_PRIORITY_HIGH) = 0; //发送数据到Port
2. GCC层数据转发流程?以下是神马东东?
<!-- [if gte mso 9]><![endif]--><!-- [if gte mso 9]><![endif]--><!-- [if gte mso 10]><![endif]-->
GCC(Conference 或 Session )需要发送数据时 ,通过McsThreadProxy的SendData接口把要发送的数据、源InfoSId、目的InfoSID通知McsThreadProxy ,McsThreadProxy 在用户线程里执行FindObject操作,找到数据的目的地。然后post event到网络线程在目的地对象上执行SendData操作。
3. RTString
Q:to cover both win32 and other platforms ?
#if defined(RT_WIN32)
template <class IterType>
CRtString(IterType s1, IterType s2)
: SuperType(s1, s2, SuperType::allocator_type())
{
}
#else
CRtString(const char* s1, const char* s2)
: SuperType(s1, s2 - s1)
{
}
#endif
4.IInfoSvrSession: What's the following ?
virtual RtResult UpdateResource(const CUpdateResource* pUdate) = 0;
5. Session
<!-- [if gte mso 9]><![endif]--><!-- [if gte mso 9]><![endif]--><!-- [if gte mso 10]><![endif]-->
Session需要处理的问题:
Session的在各服务器的创建,Default Channel的创建。Resource的保存和处理