We help IT Professionals succeed at work.

Tracking TCP packets with Java

tjgquicken
tjgquicken asked
on
I have this Java applet that connects to my web server with the openConnection method in the HttpURLConnection class: i.e. (HttpUrlConnection)(new URL("http://mysite.com")).openConnection( ). The server is supposed to send back a file. My problem is that sometimes I get no response from the server, either before or during this sending process. Unfortunately, the server is hosted by another company, and they won't give me any logs. What I'd like to know is if there's a way, using Java, to watch as the client receives and sends out TCP packets so hopefully I can figure out if the problem is on my end or the server end? Thanks.
Comment
Watch Question

Commented:
This isn't an exact answer to your question, but there are network analyzing tools, such as wireshark, that allow you to analyze traffic on your machine.

Author

Commented:
wireshark seems to do the job, thanks

Explore More ContentExplore courses, solutions, and other research materials related to this topic.