OnJava8-Examples/network/TestChatter.java

19 lines
519 B
Java
Raw Normal View History

2017-01-22 16:48:11 -08:00
// network/TestChatter.java
// (c)2017 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.util.concurrent.*;
import java.net.*;
import onjava.Nap;
public class TestChatter {
public static void main(String[] args) {
CompletableFuture.runAsync(
new ChatterServer());
CompletableFuture.runAsync(
new ChatterClient(Local.host()));
new Nap(1);
// No exceptions means success
}
}