开发者

SSDP Get Shared folder list using M-SEARCH?

I am using SSDP to send discover request using M-SEARCH to get list of services present. My requirement is like i want to get list of share folders also which are present in that server.

Currently , i am sending this request in this format :

"M-SEARC开发者_C百科H * HTTP/1.1\r\n"
    "Host: 239.255.255.250:1900\r\n" 
    "Man: \"ssdp:discover\"\r\n"
    "ST:upnp:rootdevice\r\n"
    "MX:3\r\n"
    "\r\n";

And i get response as these parameters :

ST:upnp:rootdevice
USN:uuid:122261ae-7c37-4234-9366-ed5286752f2b::upnp:rootdevice
Location:http://172.24.17.221:2869/upnphost
Cache-Control:: max-age = 900
Server:: Linux

I also want to have shared folder list which is present on that server. How i can get that ? Any additional parameter i need to specify ? Any code snippet or ideas are welcome.


As far as is know it is not possible to get any shared folders with SSDP only. SSDP gives you the list of services but it is your turn to connect to the service and "ask" for the shared folders.

In your example you would need to connect to:

Location:http://172.24.17.221:2869/upnphost

That will give you the device configuration including the supported services. Than you will need to implement the Protocol of the service you want/need to get the shared folders. For Example the ContentDirectory Service provides Folders etc.

This requires a lot more afford than simply making a M-SEARCH request.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜