Question

I am pretty new to java socket programming. I had already gone thorugh that java only deals with Internet Domain Sockets and it will support UDP and TCP and Raw IP Protocols. I want to know that is java support Raw Sockets without using any third party applications? If it is possible can anyone help me with a small example? Any small advice will be very greatful!

Was it helpful?

Solution

The only really available support for raw sockets in Java standard library seems the InetAddress.isReachable() that may do ICMP ping if permitted. This is really not much and probably even not really a raw socket, just one more protocol.

For other types of raw communication I would recommend to use Berkley sockets under Linux (root rights required) through some JNI - based wrapper.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top