Sender.java 782 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.oblivm.backend.util;
  2. import org.apache.commons.cli.ParseException;
  3. import com.oblivm.backend.flexsc.Flag;
  4. public class Sender<T> extends com.oblivm.backend.network.Client implements Runnable {
  5. public void run() {
  6. try {
  7. connect("192.168.1.102", 54321);
  8. System.out.println("connected");
  9. while (true) {
  10. double t = System.nanoTime();
  11. readBytes(65536);
  12. double t2 = System.nanoTime();
  13. System.out.println((t2 - t) / 1000000000);
  14. }
  15. } catch (Exception e) {
  16. e.printStackTrace();
  17. System.exit(1);
  18. }
  19. }
  20. @SuppressWarnings("rawtypes")
  21. public static void main(String[] args)
  22. throws InstantiationException, IllegalAccessException, ParseException, ClassNotFoundException {
  23. Sender r = new Sender();
  24. r.run();
  25. Flag.sw.print();
  26. }
  27. }