Sign up ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

While trying to write a file SocketException is throwing.

private void openSocket() { try{ multicastSocket = new MulticastSocket(port); multicastSocket.setTimeToLive(2); multicastSocket.setReuseAddress(true); multicastSocket.setNetworkInterface(networkInterface); multicastSocket.joinGroup(groupAddress); System.out.println("----------------Port Opened----------------"); }catch (Exception e) { e.printStackTrace(); Toast.makeText(getBaseContext(), "openSocket!!"+e, Toast.LENGTH_SHORT).show(); } } Log is as follows:

09-13 13:30:46.335: W/System.err(23180): java.net.SocketException: No such device
09-13 13:30:46.335: W/System.err(23180):    at org.apache.harmony.luni.platform.OSNetworkSystem.setSocketOption(Native Method)
09-13 13:30:46.335: W/System.err(23180):    at dalvik.system.BlockGuard$WrappedNetworkSystem.setSocketOption(BlockGuard.java:382)
09-13 13:30:46.335: W/System.err(23180):    at org.apache.harmony.luni.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:198)
09-13 13:30:46.335: W/System.err(23180):    at org.apache.harmony.luni.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:137)
09-13 13:30:46.335: W/System.err(23180):    at java.net.MulticastSocket.joinGroup(MulticastSocket.java:190)
09-13 13:30:46.335: W/System.err(23180):    at com.hp.loki.Settings.openSocket(Settings.java:386)
09-13 13:30:46.343: W/System.err(23180):    at com.hp.loki.Settings.access$4(Settings.java:380)
09-13 13:30:46.343: W/System.err(23180):    at com.hp.loki.Settings$2.onClick(Settings.java:183)
09-13 13:30:46.343: W/System.err(23180):    at android.view.View.performClick(View.java:2731)
09-13 13:30:46.343: W/System.err(23180):    at android.view.View$PerformClick.run(View.java:9387)
09-13 13:30:46.343: W/System.err(23180):    at android.os.Handler.handleCallback(Handler.java:587)
09-13 13:30:46.343: W/System.err(23180):    at android.os.Handler.dispatchMessage(Handler.java:92)
09-13 13:30:46.343: W/System.err(23180):    at android.os.Looper.loop(Looper.java:130)
09-13 13:30:46.343: W/System.err(23180):    at android.app.ActivityThread.main(ActivityThread.java:3694)
09-13 13:30:46.351: W/System.err(23180):    at java.lang.reflect.Method.invokeNative(Native Method)
09-13 13:30:46.351: W/System.err(23180):    at java.lang.reflect.Method.invoke(Method.java:507)
09-13 13:30:46.351: W/System.err(23180):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
09-13 13:30:46.351: W/System.err(23180):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
09-13 13:30:46.351: W/System.err(23180):    at dalvik.system.NativeStart.main(Native Method)
share|improve this question
1  
share your code so we can help you –  hardartcore Sep 12 '12 at 8:15
    
plz share your views:) –  info Sep 12 '12 at 9:54
    
Issue resolved refer this link stackoverflow.com/questions/8180275/multicast-no-such-device –  info Sep 13 '12 at 6:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.