4 public class DemoClient extends Thread
6 public static void main(String[] args)
8 DemoClient app = new DemoClient();
17 newSocket = new Socket("localhost", 5758);
18 System.out.println("Client connected to server.");
19 DataOutputStream outStream = new DataOutputStream(
20 newSocket.getOutputStream());
21 outStream.writeInt(12345);
23 } catch (Exception oops) {
24 System.out.println("Error connecting to server");