This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MulticastSocket joingroup problem  RSS feed

 
chidanand panshikar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a program which we are implementing on a proxy. I used a MulticastSocket to multicast the message to various clients. However when I use joingroup method it gives an exception that 'NO SUCH DEVICE FOUND'.
I am giving the part of code. Please help because I am lost at this point.
However the code works fine on windows not on SUSE Linux. Any configuration missing? Its an IOException.




import java.awt.*;
import java.applet.*;
import java.net.*;
import java.io.*;

public class EncoderProxyClient implements Runnable
{
MulticastSocket s;
Thread t;
InetAddress mcAddress;
int mcPort;
public static final int MAX_LEN = 64*1024;
String curr_file = "";
String filePath = "c:/apache2/htdocs/elearning/courses/";
//String filePath = "/srv/www/htdocs/elearning/courses/";
long start, end, len;
int fileSize, byteSize;
boolean isNew = false;

public EncoderProxyClient()
{
int ttl = 3;
try
{
String ipaddress = "239.2.221.2";
mcAddress=InetAddress.getByName(ipaddress);
mcPort = 44444;
t = new Thread(this);
s = new MulticastSocket(mcPort);
s.joinGroup(mcAddress);
System.out.println("Receiving Mode On..");
t.start();
}
catch(Exception e)
{
System.out.println("Error...in ..init.." + e.getMessage());
}
}
[ November 17, 2004: Message edited by: chidanand panshikar ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!