multicast thread and TCP server running toghether,client can't connect..
i have programmed a simple java server that launches a multicast thread and right after that listens to the clients' connections on a TCP protocol and serves the client's request.
the multicast thread on the server is constantly listening for infos about the state of remote_servers that run on other machines and are RMI_dedicated to the work that the main server has to do for the client
i wrote all the code,but when i run it on my local machine,the multicast threads work and set themselves,but when i launch the client,the connection's refused and i can't figure out why..
all the multicast threads send/receive on a multicast address,by the time that the server puts himself on a serversocket.accept it should be able to get the client's connection,but no..
this is what the server does:
//-->start the Mainreceiver for the info about remoteworkers
to_workers = new MainReceiver(collection_remotes);
to_workers.run();
//-->initializing serversocket
try {
serv_sock = new ServerSocket(SERVERFARMPORT);
} catch(Exception e) {
e.printStackTrace();
System.out.println("error while creating serversocket on SERVERFARMPORT");
System.exit(-1);
}
//-->accepting connections and giving them to threads
while(true){
try {
client_sock = serv_sock.accept();
} catch (IOException e) {e.printStackTrace();}
//-->starting the dedicated client thread
cli_thread = new ClientServiceThread(client_sock,collection_remotes);
cli_thread.start();
}
hope i made the point,thanxalot

