commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Buistov" <>
Subject [httpclient] question
Date Sun, 12 Oct 2003 09:25:43 GMT
Hi all!

During my refactoring battles I've faced with a task to replace a custom socket read\write
framework with commons-httpclient.
That would really simplify a code and [probably] bring a better perfomance.

One of the use cases is the following chain of actions:

1) write some command to socket
2) do something on server-side (for instance, press the button 'I got your request, man!')
3) read the response from socket

Now I stuck porting this to HttpClient, because I'm wondering how should I tell HttpClient
to wait for user action.
It probably means that Client should keep listening the socket after writing some data to
it? How to do this?

The code looks like this :

        HttpClient client = new HttpClient();
        HostConfiguration hc = new HostConfiguration();
        hc.setHost("localhost", 1010);
        PostMethod post = new PostMethod();


Alexey Buistov, 
Software Engineer, 
Miratech Ltd. 
41 Nauki Ave, 
03028 Kiev, Ukraine, 
tel:   +38 044 206 4090 ext number
        +38 044 206 4099
fax:  +38 044 206 4091 
ICQ: 83154650

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message