Pārlūkot izejas kodu

added client methods

master
MrTob pirms 5 gadiem
vecāks
revīzija
0414198a8d
1 mainītis faili ar 17 papildinājumiem un 0 dzēšanām
  1. +17
    -0
      src/xyz/nextn/Client.java

+ 17
- 0
src/xyz/nextn/Client.java Parādīt failu

@@ -1,6 +1,23 @@
package xyz.nextn;


import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.util.Scanner;

public class Client{
private int port;
private InetAddress ip;

public Client(int port, InetAddress ip) {
this.port = port;
this.ip = ip;
}

public void getData() throws IOException {
Scanner scn = new Scanner(System.in);
InetAddress ip = InetAddress.getByName("localhost");
Socket s = new Socket(ip, port);
}
}

Notiek ielāde…
Atcelt
Saglabāt