aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Problem in Socket communications between two different OS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Problem in Socket communications between two different OS" Watch "Problem in Socket communications between two different OS" New topic
Author

Problem in Socket communications between two different OS

Vineet Venkatesh
Greenhorn

Joined: Oct 08, 2002
Posts: 4
I have a particular problem wherein i am trying to send data through a Server Socket written in VB hosted on Windows NT OS.I have a client socket written in Java hosted on Weblogic application Server on Sun Solaris.This client Socket is running on a while true loop and whenever any data is available on the client socket it reads using the inputstream.read() method, what i am experiencing is that in very rare scenarios the data even after having been sent by the Server Socket is not being received on the client side.It seems it is not available on the socket itself to be read.To resolve this we padded each chunk of data being sent to be equal to 8192 bytes which is equal to the TCP/IP buffer size on any Windows NT machine,we still are facing the problem.
I would be very obliged if anyone can suggest a way to resolve this particular issue.
Regards
Vineet Venkatesh
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
First off, please change your display name to conform to our naming policy. Thanks.
Toughie. I suspect the two different OSs thing is a lark; it should work, different OSs or not. I know you tried to cover that already, but are you (a) sure the buffers always get flushed and (b) sure you're not blocking trying to read more data than is there? It's the best I can think of. You may have to use a low level TCP/IP or even IP or network level monitoring tool to get to the bottom of this.
- Peter
 
Don't get me started about those stupid light bulbs.
 
subject: Problem in Socket communications between two different OS