怎么测试服务器是否在运行,如何检查UPnP服务器是否正在运行?(How to check whether UPnP server is running or not?)...

I am using platinum UPnP stack, and I am trying to check whether the UPnP service is running or not. This is the example code from Platinum that I am running. However, I want to debug whether the Device is added or not. How can I see or debug whether the device has really started the UPnP or not.I am using Fedora core - 12.

int

main(int /* argc */, char** /* argv */)

{

PLT_UPnP upnp;

PLT_DeviceHostReference device(new PLT_LightSampleDevice("Platinum Light Bulb"));

#ifdef TEST_EMBEDDED_DEVICE

PLT_DeviceDataReference device2(new PLT_LightSampleDevice("Platinum Light Bulb embed 1"));

device->AddEmbeddedDevice((PLT_DeviceDataReference&)device2);

PLT_DeviceDataReference device3(new PLT_LightSampleDevice("Platinum Light Bulb embed 2"));

device->AddEmbeddedDevice(device3);

#endif

upnp.AddDevice(device);

upnp.Start();

char buf[256];

while (gets(buf)) {

if (*buf == 'q')

break;

}

upnp.Stop();

return 0;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
If you are experiencing problems with the Universal Plug and Play service, your computer might not be able to automatically detect the presence of other networked devices, such as PCs, printers, Internet access points and so on. That is where the UPnP Test application comes in. This simple program is designed to help you identify the issues that prevent the UPnP protocol from functioning correctly. Before you get your hopes up, you should know that this tool does not solve the detected problems, but only performs a series of tests to identify the possible causes. One advantage is that the application does not require installation, so your system registry is not affected in any way. The interface is compact and simple, comprising only two panels: one that displays the test type and its short description and the other for viewing which of the tests passed and which failed. The program can verify whether the operating system provides support for the UPnP service and allows you to check if the Simple Service Discovery Protocol (SSDP) and the UPnPHost services are running. It also verifies the connection between your network adapter and your router and the system's capacity to receive UPnP messages, as well as the router's capability to report an external IP address. One of the tests is designed to check if the Windows firewall service is blocking the traffic between your router and the system, thus preventing UPnP from working. The results can be copied to your clipboard by simply pressing a button and the tests can be redone easily. If you want to fix the detected issues, the link in the main interface can prove useful. In conclusion, UPnP Test is a simple tool for detecting problems related to device-to-device networking. However, it can only suggest possible reasons why the UPnP is not working, fixing the detected issues is totally up to you.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值