RE: Paket loss with JXTASockets when using JXTASocket.close()
"Vitaly Vainer" <[email protected]>
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Unfortunately I'm getting the same problem. I'm using following hack: Server notifies client when he finished and client closes socket, server than gets IOException, which is ok if it finished sending data. Vitaly. -----Original Message----- From: Matthias Horst [mailto:[email protected]] Sent: Tuesday, August 02, 2005 5:05 PM To: [email protected] Subject: [JXTA user] Paket loss with JXTASockets when using JXTASocket.close() Hi, I'm using JXTA 2.3.4. I took the JXTASocket example from the tutorials and modified it in such a way that the communication is vice versa. This means the client is sending a request and the server responds. To make it simple the client sends 100Bytes and the server echos this message 1000 times. I discovered the following problem: Although the server writes the complete response to the output stream, the clients very often does not receive all the data. Sometimes there arrive only some pakets sometimes (but not very often) everything arrives. Moreover I found out that if i leave away the socket.close in the server code, the client receives always everything! Of course then the clients hangs until the read timeout occures. Server and client code are in the attachments. Any idea? -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.8/61 - Release Date: 01/08/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.8/61 - Release Date: 01/08/2005