Re: Paket loss with JXTASockets when using JXTASocket.close()
Mohamed Abdelaziz <[email protected]>
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Why not just try the patch in issue1367 <http://platform.jxta.org/issues/show_bug.cgi?id=1367> Mohamed -- http://blogs.sun.com/roller/page/hamada http://weblogs.java.net/blog/hamada Poole, Paul P1 wrote: >Just a thought... Why not extend that hack such that the client sends a >message back to the server saying it has received the notification to >close, then both can close the connection. If I am misunderstanding the >situation, please excuse me... I am still very new to JXTA. > >Paul > >-----Original Message----- >From: Vitaly Vainer [mailto:[email protected]] >Sent: Tuesday, August 02, 2005 10:24 AM >To: [email protected] >Subject: RE: [JXTA user] Paket loss with JXTASockets when using >JXTASocket.close() > > >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? > > >