Examples of GRTClientSocket


Examples of com.grt192.networking.GRTClientSocket

        //new client
        final LoggerModel lms = new LoggerModel();

        //new connection to client
        GRTClientSocket gcs = new GRTClientSocket(IP, PORT);
        gcs.start();
        gcs.addSocketListener(lms);

        //new panel
        LoggerUI lu = new LoggerUI(lms);

        JFrame vars = new JFrame("vars");
View Full Code Here

Examples of com.grt192.networking.GRTClientSocket

    this.y = 0;
    this.heading = 0;
    this.armExtended = false;
    this.firing = false;
    this.readyToFire = false;
    this.socket = new GRTClientSocket(HOST, PORT);
    socket.start();
    listeners = new Vector<RobotModelListener>();
  }
View Full Code Here

Examples of com.grt192.networking.GRTClientSocket

  static String host = "127.0.0.1";
  static int port = 80;

  public static void main(String[] args) {
    System.out.println("Starting Network Test");
    GRTClientSocket connection = new GRTClientSocket(host, port);
    connection.addSocketListener(new SocketListener() {

      public void dataRecieved(SocketEvent e) {
        System.out.println("< " + e.getData());
      }

      public void onConnect(SocketEvent e) {
        System.out.println("Connected!");
      }

      public void onDisconnect(SocketEvent e) {
        System.out.println("Disconnected!");
      }
    });
    connection.connect();
    connection.start();
    try {
      connection.sendData("GET /index.html HTTP/1.0\n");
      Thread.sleep(4000);
      connection.disconnect();
      System.exit(0);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.