chatprogramm was sonst
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
660 B

1 year ago
1 year ago
1 year ago
  1. package client;
  2. import client.log.EventLogger;
  3. import client.net.Client;
  4. import java.io.BufferedReader;
  5. import java.io.InputStreamReader;
  6. public class Main {
  7. public static EventLogger console;
  8. public static void main(String[] args) {
  9. System.out.println("Client!");
  10. console = new EventLogger(System.out);
  11. Client c = new Client("localhost", 5000);
  12. BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
  13. while (true) {
  14. try {
  15. c.write(r.readLine().getBytes());
  16. } catch (Throwable e) {
  17. e.printStackTrace();
  18. }
  19. }
  20. }
  21. }