File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) 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

Problem in Socket communications between two different OS

Vineet Venkatesh

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 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.
Vineet Venkatesh
Peter den Haan
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
I agree. Here's the link:
subject: Problem in Socket communications between two different OS
It's not a secret anymore!