Has anybody tried creating RawSocket
in Android
and have succeeded ?
Asked
Active
Viewed 5,702 times
3 Answers
10
So far as I'm aware access to raw sockets is not availables in any pure Java library.
In part this is because on most O/S access to raw sockets is a privileged operation, only available to processes running as root / administrator.
The Socket
and DatagramSocket
classes available in the java.net
package are implicitly IP sockets (for TCP, and UDP, respectively).
See for more detail at Apple Lists - Java raw sockets.

naXa stands with Ukraine
- 35,493
- 19
- 190
- 259

Alnitak
- 334,560
- 70
- 407
- 495
3
I havent actually created any raw sockets in Android but the java.net and javax.net packages shold do what you need,

Declan Shanaghy
- 2,314
- 2
- 18
- 19