Up | Previous | Next |
We can do that in three different ways (by contrast with sockets we can do it in only two different ways):
sluggo.cs.indiana.edu
.
We choose a free port and start the server on sluggo:
We connect each client to the server:
java Server 18276
java Client sluggo.cs.indiana.edu 18276
(We assumed we pick the same number for the port).
java Client 127.0.0.1 18276
Setup.java
program. This is, in fact, what differentiates our method (based on RMI) from what we can be done using sockets.
For development purposes we should use: 2, 3. (The first method listed is called: deployment.)
If we're not very familiar with the pattern presented here method 2 is definitely the safest (it enforces OOP, but not an API).
Up | Previous | Next |