aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Could data be confused with the options field? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Could data be confused with the options field?" Watch "Could data be confused with the options field?" New topic
Author

Could data be confused with the options field?

Chris Singer
Greenhorn

Joined: Nov 27, 2001
Posts: 15
Hi all. I was wondering if someone could fill me in on why I can't receive responses from an application. Have been using TCPdump to watch the network communication between the client I'm writing and the server on the other end. I have no trouble sending data to it through the socket that I've created. When the server replies with a 6 byte '7e7e7e7e7e7e' reply i can't seem to read it from the DataInput stream. Here is the TCPDump of the packet I wish to read data from. I have included the IP and TCP headers in hex.

As can be seen from the offset value of 5 in the TCP header the 7e7e 7e7e 7e7e values should be considered data and I believe I should be able to read this out using the Input stream given by my socket. Only problem is when I go to read the input stream my program hangs (IE read never returns). I have tried using the readByte() method and it still hangs. Could anyone give me some feedback on what I'm doing wrong here?
[This message has been edited by Chris Singer (edited December 05, 2001).]
Chris Singer
Greenhorn

Joined: Nov 27, 2001
Posts: 15
Sorry folks, this isn't truly a valid question Java question as much as it is a networking question. The problem is TCP Dump was showing the 7e7e7e because its part of the ethernet packet. That is why I was unable to read it out of the data input stream.
Cheers.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Could data be confused with the options field?
 
Similar Threads
Configuring Toolkit 1.0.4_01 to use sockets
What IO classes can accept non-Java data types
how to send a file or photo to clients using sockets??
ObjectInputStream.readObject() hangs forever during socket communication
BufferedReader.readLine() hangs when using SSL