agent/src/main/java/EchoServer.java [30:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static void send(String host, int port, String message) {
    try (Socket sock = new Socket(host, port)) {
      ObjectOutputStream outStream = new ObjectOutputStream(sock.getOutputStream());
      outStream.writeObject(message);
      System.out.println("Sent message " + message);
      ObjectInputStream inputStream = new ObjectInputStream(sock.getInputStream());
      String echo = (String) inputStream.readObject();
      System.out.println("Received message " + echo);
    } catch (IOException | ClassNotFoundException e) {
      e.printStackTrace();
      throw new IllegalStateException(e);
    }
  }


  public static void main(String[] args) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



example/Client.java [9:24]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static void send(String host, int port, String message) {
    try (Socket sock = new Socket(host, port)) {
      ObjectOutputStream outStream = new ObjectOutputStream(sock.getOutputStream());
      outStream.writeObject(message);
      System.out.println("Sent message " + message);
      ObjectInputStream inputStream = new ObjectInputStream(sock.getInputStream());
      String echo = (String) inputStream.readObject();
      System.out.println("Received message " + echo);
    } catch (IOException | ClassNotFoundException e) {
      e.printStackTrace();
      throw new IllegalStateException(e);
    }
  }


  public static void main(String[] args) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



