Re: [xSocket-develop] HttpClien problems
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-07-18 13:18:21
|
Hi Maurizio, thanks for your feedback. I'm going write some JUnit-Tests based on your code. The next version of xSocket-http 2.0 (beta-2) should fix these bugs. Because beta-2 is a performance and bug fixing release, your wishes will be input for the following version xSocket-http 2.0 (final). Gregor 2008/7/18 Masar <ma...@ma...>: > > Hi Gregor, > I did some test with your library and found it very useful. > In the attach you can find a sample HttpClient I did to test the lib: > feel free to include it in the library if you think it could be useful > as a sample. > > Now I can tell you the problems I found; I did my tests on Linux with > Sun java version "1.6.0_06", xSocket-2.1.jar, xSocket-http-2.0-beta-1.jar > > 1) When I do httpClient.close() some TCP connections are non closed > immediately but remain connected to the remote hosts for about 40 > seconds (see *2). If I use the non pooled version > httpClient.setPooled(false) I do not have the problem. > > 2) If there is an host that is non existant (es: > www.asdasdadasdasdasdasd.com) > the problem is worst, all the connections are not closed. > > 3) If there is a non responding host (es: http://www.google.com:81) I > cannot control the TCP timeout because it seems I have no access to > the HttpClientConnection to set the parameter SO_TIMEOUT. > > Next two wishes: > 1) It could be useful to have an Attachment in the HttpClient send, > that I could retrieve from IHttpResponseHandler, this would let me use > a single instance of IHttpResponseHandler instead of one for each > Request. > > HttpClient > void send(IHttpRequest request, IHttpResponseHandler > responseHandler, > Object oAttachment) > > IHttpResponseHandler > void onResponse(IHttpResponse response, Object oAttachment) > void onException(IOException ioe, Object oAttachment) > > 2) I don't like annotations used to modify a function mode of operation, > because they are difficult to document and easily to forget, I would > prefer > a flag in HttpClient to specify the InvokeOn mode of operation. > > Thanks > > Maurizio Sartori > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > |