Firstly, I would like to post some real code for this question, but I cannot, because there are too many lines. However, here is my situation:
Server side
I have an RMI server that expects clients to connect and "register" on their own so that the Server can make function calls on the Clients. Basically, the server has a published function that works like the following pseudocode:
public class Server extends UnicastRemoteObject implements ServerInterface{
public Server(){ }
...
public void registerClient(Client c) throws RemoteException{
}
}
Client side
At startup, the client makes a call Naming.lookup([url])to get a stub on the server that I will call serverRefand then call serverRef.registerClient(this). The problem is the first line of the server method registerClient(Client c).
Problem
Client registerClient, RemoteException. , IP-. , IP- :
IP- : 123.45.67.1
IP- : 123.45.67.2, 192.168.67.2
, , , Client 192.168.67.2, . 123.45.67.1. , , IP-, , .
"" RMI, IP- ?