채팅1 ChatClient package examples.network; import java.net.*;import java.io.*; public class ChatClient { public static void main(String[] args) {if(args.length != 2){System.out.println("사용법 : java ChatClient id 접속할서버ip");System.exit(1);}Socket sock = null;BufferedReader br = null;PrintWriter pw = null;boolean endflag = false;try{sock = new Socket(args[1], 10001);pw = new PrintWriter(new OutputStreamWriter(sock.g.. 2016. 1. 22. 이전 1 다음