Re: Detecting clsoed socket on OutputStream.Write
- From: EJP <esmond.not.pitt@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 09:02:19 GMT
Knute Johnson wrote:
That's why the read throws an exception immediately then, the outgoing data is locally buffered? How long will the local data be buffered? Does not the flush() cause it to go now?
All that flush() does is is get it out of the JVM into the socket send buffer. The data can only go from there onto the wire if there is room in the receiver's receive buffer, and if the receiver is slower than the sender eventually the room will run out. Also, data is only deleted from the sender's send buffer once it has bene acknowledged by the receiver. So if the receiver completely disappears eventually your send buffer will fill up and eventually your TCP will time out the write attemps and reset the connection. Your *next* read or write will then discover this and get a SocketException.
.
- Follow-Ups:
- Re: Detecting clsoed socket on OutputStream.Write
- From: Knute Johnson
- Re: Detecting clsoed socket on OutputStream.Write
- References:
- Detecting clsoed socket on OutputStream.Write
- From: david . topham
- Re: Detecting clsoed socket on OutputStream.Write
- From: Knute Johnson
- Re: Detecting clsoed socket on OutputStream.Write
- From: EJP
- Re: Detecting clsoed socket on OutputStream.Write
- From: Knute Johnson
- Detecting clsoed socket on OutputStream.Write
- Prev by Date: Re: cut and join mp3-files with known bitrate
- Next by Date: Re: cut and join mp3-files with known bitrate
- Previous by thread: Re: Detecting clsoed socket on OutputStream.Write
- Next by thread: Re: Detecting clsoed socket on OutputStream.Write
- Index(es):
Relevant Pages
|
|