I have read the source code of HTTPRequest.java, and it contains a post method with the fixed timeout option. In other words, both SOAP request and XML description retrieval invoke such method. But it will raise some problem. For example, there are several UPnP devices in the same subnet, but some UPnP device has a very bad implementation (very common sense), it does not hold any URL for some description file. In this case, the control point will be hanged for a while, which will give some user an illusion that some devices cannot be found. To solve this problem, we should just set the timeout shorter. However, it will result in another problem. In the UPnP AV, we send a "Browse" action to Media Server, if the MediaServer have a lot content, longer timeout is expected. Therefore, I think, is it possible to add a timeout parameter for the post method in order to adapt the different usages.
Thanks for any help and suggestions.
Regarding to the previous post. The WD TV Live Hub maybe have a bug, it responds different messages:
HTTP/1.1 200 OK
SERVER: POSIX, UPnP/1.0, Intel MicroStack/1.0.1497
HTTP/1.1 200 OK
DATE: Mon, 25 Jul 2011 09:20:40 GMT
SERVER: Linux/2.x.x, UPnP/1.0, pvConnect UPnP SDK/1.0
In fact, the location url of the first url is not reachable, which results in that Parser::parse method will be hanged for a certain time, the upcoming devices cannot be discovered. So I suggest that,
after this statement
HttpURLConnection urlCon = (HttpURLConnection)locationURL.openConnection();
Theses statements should be appended.
Thanks for any kinds of comment.
I will add a global method into the ControlPoint class for your suggestion as the following.
Do you have any suggestions ?
Thanks for you fast reply. I am very interesting in this project. How can I become the committer or developer of this project.
I have added your account, horsson, into the project as a developer.
Please check it :-)
Thanks very much. I will take my spare time to check the open issues and open discussion.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.