Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

24 righe
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. }