views:

1874

answers:

2

Hi,

Has any body tried creating Raw socket in android and have succeeded. Please let me know.

regards Harish

+1  A: 

I havent actually created any raw sockets in Android but the java.net and javax.net packages shold do what you need,

java.net package overview

javax.net package overview

Declan Shanaghy
+2  A: 

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 http://lists.apple.com/archives/Java-dev/2004/Jul/msg00086.html

Alnitak