首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >c++ ptlib PNotifier在OPAL中的应用

c++ ptlib PNotifier在OPAL中的应用
EN

Stack Overflow用户
提问于 2012-09-15 07:08:08
回答 1查看 198关注 0票数 1

我正在使用OpalVoip制作一个软电话应用程序,但我遇到了以下问题:

代码语言:javascript
复制
void MyManager::main()
{
    //variables
    PNotifier notify; // this is the problem
    //it is the template PNotifierFunctionTemplate<INT>

    //more stuff 

    listener->Open(notify); 

    //listener is of type OpalListenerUDP
    //it should start the listener and wait for incoming connection
    //but however i need to pass this NOTIFY which should be the INT parameter to the
    //new OpalTransport instance created by the listener...
    //however OpalListenerUDP only creates OpalTransport after the connection is
    //accepted as so in following: OpalListenerUDP::Accept(/*time interval*/)
    //
    //So far I think that this notifier should be a pointer to an object of type
    //OpalListenerUDP but i have no idea how to get it done 
}

任何帮助都会很感激的,瑞德。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-09-16 17:52:55

经过对opal源代码的深入研究,我找到了解决方案。事实证明,

代码语言:javascript
复制
OpalConnection::StartListener(OpalListener&);

将执行打开侦听器的工作,因此不需要调用OpalListener::Open(),因此只需调用OpalListener::Accept即可接受连接。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12433090

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档