Divers
Divers

Reputation: 9569

How can I send and receive the RST flag from TCP using Java?

Is it possible to send and receive the RST flag from TCP using Java? If is, I would be grateful for some example code.

Upvotes: 1

Views: 536

Answers (1)

David Webb
David Webb

Reputation: 193716

No, it's not possible. Java interacts with networking at a different level to the RST flags.

Java allows you to create Sockets with TCP so you are interacting at the Session Level (Layer 5 in the OSI Model).

RST flags are handled by the TCP stack as part of the Transport. So this is usually part of the OS and not handled by the Java VM at all.

The idea is that usually when you're writing code you can create your sockets and not care too much about exactly how they work. If you really want to do some low level network troubleshooting you're going to have to use something other than Java.

Upvotes: 3

Related Questions