You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by hjw <hj...@gmail.com> on 2008/03/20 03:49:33 UTC

The abort operation is close the socket

Hi,all:
   I find HttpMethod#abort() will close socket, but I only want to interrupt
the IO operation which is using the network.
   My case is that some important message must post at once when data I get
from the same site is match some condition.So , I need to interrupt the IO
operation and let the post action has the highest priority.
   Could you tell me whether abort the is the only way to do for the case,or
has a better one?

Raymond

Re: The abort operation is close the socket

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2008-03-20 at 10:49 +0800, hjw wrote:
> Hi,all:
>    I find HttpMethod#abort() will close socket, but I only want to interrupt
> the IO operation which is using the network.
>    My case is that some important message must post at once when data I get
> from the same site is match some condition.So , I need to interrupt the IO
> operation and let the post action has the highest priority.
>    Could you tell me whether abort the is the only way to do for the case,or
> has a better one?
> 
> Raymond

Raymond,

I do not think classic I/O model is applicable for this scenario.
Consider using NIO (non-blocking I/O) instead.

Oleg 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org