package com.peterhi.remote;
import com.peterhi.net.rudp.RudpServer;
public class RemoteServer {
public static void main(String[] args) throws Exception {
RudpServer server = new RudpServer();
RemoteRegistry registry = new RemoteRegistry(server, 8000);
RemoteInterface ri = new RemoteInterfaceImpl();
registry.publish("remoteInterface", RemoteInterface.class, ri);
server.start(22222);
for (int i = 0; i < 2; i++) {
if (i == 0) {
Thread.sleep(5000);
} else {
Thread.sleep(2000);
}
ri.fireEvent(null, "Hello World! " + i);
}
}
}