소스 검색

added client methods

master
MrTob 4 년 전
부모
커밋
0414198a8d
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. +17
    -0
      src/xyz/nextn/Client.java

+ 17
- 0
src/xyz/nextn/Client.java 파일 보기

@@ -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);
}
}

불러오는 중...
취소
저장