CS158a
Chris Pollett
May 6, 2009
public interface Contract extends Remote {//Remote is in java.rmi public void method1(...) throws RemoteException; //other methods }
public class ServiceProvider extends UnicastRemoteObject implements Contract {/*code*/}
Contract server = new ServiceProvider(...); Naming.rebind(name, server);
rmic ServiceProviderThis generates two files ServiceProvider_stub.class and ServiceProvider_Skel.class. The former should be on the client machine the latter on the server. These class files actually handle the communication over the internet.
Remote remoteObj = Naming.lookup(name); /*looking up rmi names is done with a URL like rmi://host:port/name where name is the name of the service on the server */ Contract serverObj = (Contract)remoteObj; ... serverObj.method1(...);
ipfw listor
iptables --list
ipfw add 1000 allow ip from 10.0.0.0/8 to anyor for iptables like:
iptables -A INPUT -s 192.168.0.0/24 -p tcp -m tcp --dport 80 -j ACCEPT
V=2 | P | X | CC | M | PT | Sequence Number |
Timestamp |
Synchronization source (SSRC) identifier |
Contributing source (CSRC) identifiers ... |
Extension Header |
RTP Payload |