package protocol_sockets.example; import java.io.*; /** *

* This program runs {@link ExampleServer} and {@link ExampleClient} to * demonstrate the functionality of this package. *

* * @author Stephen G. Ware */ public class Example { /** Run the test */ public static void main(String[] args) throws IOException, InterruptedException { ExampleServer server = new ExampleServer(12345); ExampleClient client = new ExampleClient("localhost", 12345); server.start(); Thread.sleep(100); client.start(); server.join(); client.join(); System.out.println("DONE"); } }