unreg.cxx

来自「这是国外的resip协议栈」· CXX 代码 · 共 45 行

CXX
45
字号
#include "rutil/Logger.hxx"#include "resip/dum/ClientRegistration.hxx"#include "CommandLineParser.hxx"#include "UserAgent.hxx"using namespace resip;#define RESIPROCATE_SUBSYSTEM Subsystem::TESTclass TestUserAgent : public UserAgent{   public:      TestUserAgent(int argc, char** argv) : UserAgent(argc, argv)      {      }      void startup()      {         InfoLog (<< "register for " << mAor);         UInt32 e=0;         NameAddr target(mAor);         mDum.send(mDum.makeRegistration(target, e));      }               void onSuccess(ClientRegistrationHandle h, const SipMessage& response)      {         InfoLog (<< "Removing binding for " << *h);         h->removeAll(true);      }};intmain(int argc, char** argv){   TestUserAgent tua(argc, argv);   tua.startup();   for (int i=0; i<100000; ++i)   {      tua.process();      usleep(10);   }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?