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.

24 lines
505 B

  1. package xyz.nextn;
  2. import java.io.IOException;
  3. import java.net.InetAddress;
  4. import java.net.Socket;
  5. import java.util.Scanner;
  6. public class Client{
  7. private int port;
  8. private InetAddress ip;
  9. public Client(int port, InetAddress ip) {
  10. this.port = port;
  11. this.ip = ip;
  12. }
  13. public void getData() throws IOException {
  14. Scanner scn = new Scanner(System.in);
  15. InetAddress ip = InetAddress.getByName("localhost");
  16. Socket s = new Socket(ip, port);
  17. }
  18. }