Exemplo n.º 1
0
 public static void main(String[] args) throws URISyntaxException, IOException {
   HproseTcpServer server = new HproseTcpServer("tcp://0.0.0.0:8080");
   server.publish("time");
   server.start();
   Timer timer = new Timer(() -> server.push("time", Calendar.getInstance()));
   timer.setInterval(1000);
   System.out.println("START");
   System.in.read();
   server.stop();
   System.out.println("STOP");
 }
 public void start() throws IOException {
   tcpServer.start();
 }