Sockets, writing data and shutdownOutput
- From: "HK" <pifpafpuf@xxxxxx>
- Date: 2 Aug 2005 07:06:19 -0700
My client connects to an HTTP server by opening a
socket, starting a separate thread to feed it with
data and reading the response in the main
thread. The feeder thread basically does this:
OutputStream out = socket.getOutputStream();
out.write(...);
out.flush();
socket.shutdownOutput();
Problem: roughly half of the time the server
resets the connection before sending its response?
I use the shutdownOutput to make sure the server
understands that we are done and no more data can
be expected, but it seems that it overinterpretes
it as if my client is not interested in
pending response data?
Anyone had this problem and can shed some more
light on it?
Harald.
------------------------------------------------------------------------
Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software
.
- Follow-Ups:
- Re: Sockets, writing data and shutdownOutput
- From: HK
- Re: Sockets, writing data and shutdownOutput
- From: Thomas Weidenfeller
- Re: Sockets, writing data and shutdownOutput
- From: Thomas Hawtin
- Re: Sockets, writing data and shutdownOutput
- From: jan V
- Re: Sockets, writing data and shutdownOutput
- Prev by Date: ANN. SimpleTemplate - Template Engine for java
- Next by Date: Re: Sockets, writing data and shutdownOutput
- Previous by thread: ANN. SimpleTemplate - Template Engine for java
- Next by thread: Re: Sockets, writing data and shutdownOutput
- Index(es):
Relevant Pages
|