您的位置:首页 > 其它

UC故事 2012/04/26

2012-04-26 08:07 351 查看
1. client/server browsing

Q: 以下为对应关系?

session::CConference <-> gcc::InfoSvrConf

session::CConfSession <-> gcc:InfoSvrSession

Note: :CConfDetailInfo is used by both client and gcc !

* biz concept

conference: status chart ?

sessinon: status chart ?

* data 传到component的路径

connection -> CConference::onReceiveData -> CConfSession::OnReceiveData -> (ISessionClientSink) Component:OnReceiveData

* 几个可能需要改进的方面

# session代码中根据session type或pdu type或DATA_FLAG做的switch,不利于新功能加入

# client与serer之间关于session的create/enroll的交互,可能可以优化,减少交互次数

* 关于T120系列的标准

http://www.itu.int/rec/T-REC-T.122-199802-I/en

* MCS与Port

# MCS注册了很多不同种类的port

# 其核心功能是SendData,转发数据,会调用Port::SendData

# 转发过程中,会使用Route Table提供的信息

* 线程有关的特殊代码

McsThreadProxy::CreateChannel(CInfoSID& channelID, DWORD channelEx)

{

...

RtResult rv = _GetInfoSIDSequence(CInfoSID::ITYPE_CHANNEL, channelID);

RT_ASSERTE_RETURN( RT_SUCCEEDED(rv) , RT_ERROR_FAILURE );

Function::Functor* pFunctor = Bind::bind(_pMcs, &Mcs::CreateChannel, channelID, channelEx, (IInfoSvrPort*)NULL , TRUE );

return CThreadSwitch::SwitchToNetThreadSyn(pFunctor);

}

Q: What's up here ?

A:在net thread中执行Mcs::CreateChannel 2012/07/14

* ThreadProxy::SendData

其实质就是向network thread / user thread post一个event

Function::Functor* pFunctor = Bind::bind(_pMcs,

&Mcs::EvtSendData,

pSrcPort,

DstID,

Data.DuplicateChained(),

DataFlag,

DataPriority);

CThreadSwitch::SwitchToNetThreadAsyn(pFunctor);

return RT_OK;

..

}

RtResult CThreadSwitch::SwitchToThreadAsyn(Function::Functor* pFunctor ,

CRtThreadManager::TType dwRtThreadID )

{

RT_ASSERTE( pFunctor != NULL );

CRtThread* pUserThread = CRtThreadManager::Instance()->GetThread(dwRtThreadID);

if( NULL == pUserThread )

{

return RT_ERROR_NULL_POINTER;

}

return pUserThread->GetEventQueue()->PostEvent(pFunctor);

}

namespace Function

{

class Functor : public IRtEvent

{

,,,

public:

virtual RtResult OnEventFire()

{

return RT_OK;

}

};

...

}

Q:这里的Bind::bind与Function::Functor到底为何物 ???

2. iPhone/iPad audio

3. 杂想杂问

Q:网络已经断掉这个消息如何通知到Client的应用层的?

Q:ThreadProxy::SendData方法why是灰色的并且在VC的method list search中找不到呢?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: