socket exception in android
I am trying to write a simple UDP se开发者_如何学编程rver for android and when I run it I get the following exception: "java.net.socketException: Permission Denied" I tried to add the permission to my menifest (<uses-permission android:name="android.permission.INTERNET" />
) but I still get the same exception.
the code that causes the exception is:
int in_port = 61000
DatagramSocket server_socket = new DatagramSocket(in_port);
Does someone know what the problem might be?
Thanks, Binyamin
Could this be your solution?. Post your manifest file on here.
Its also possible that your socket is in use. In this case set the socket as reusable
Please add details to your question.
If you are setting up your emulator as a server see this thread;
精彩评论