[네트워크개론, 컴퓨터통신, 데이터통신, 컴] Java로 구현한 간단한 채팅 프로그램
*성*
다운로드
장바구니
소개글
이번에 컴퓨터 네트워크 개론이라는 과목을 들으면서 숙제로 작성한 간단한 채팅 프로그램입니다...Program1에서는 그냥 프로그램이구요, Program2는 서버의 IP주소(host name), Port Number를 실시간으로 입력받아서 작동하는 프로그램입니다...
실행화면도 캡쳐해서 올렸구, 주석도 자세하게 달려고 노력했으니 도움이 많이 되실거에요..^^
목차
없음본문내용
//TCP 채팅을 위한 클래스class ChattingManager{
String serverIP; //접속하려는 서버 IP
int serverPort; //접속하려는 서버의 포트번호
Socket clientSocket; //접속을 위한 소켓
BufferedReader inFromServer; //서버로부터오는 메시지 내용
DataOutputStream outToServer; //사용자 입력을 서버로 보내기 위함
BufferedReader inFromUser; //사용자 입력 내용
class ChatManager {
int serverPort;
ServerSocket serverSocket; // accept하기전에 서버에서 여는 소켓
Socket clientSocket=null; // 사용자 소켓 descriptor
BufferedReader inFromUser=null; //사용자(서버)의 입력
BufferedReader inFromClient=null; //클라이언트쪽의 메시지
DataOutputStream outToClient=null; //사용자 입력을 클라이언트로 전달하기 위한 변수
참고 자료
없음압축파일 내 파일목록
program_lab1/HW#1TCPClient_after.gif
program_lab1/HW#1TCPClient_before.gif
program_lab1/HW#1TCPServer_after.gif
program_lab1/HW#1TCPServer_before.gif
program_lab1/TCPClient/ChattingManager$serverMessageThread.class
program_lab1/TCPClient/ChattingManager$userInputThread.class
program_lab1/TCPClient/ChattingManager.class
program_lab1/TCPClient/TCPClient.bat
program_lab1/TCPClient/TCPClient.bat.bak
program_lab1/TCPClient/TCPClient.class
program_lab1/TCPClient/TCPClient.java
program_lab1/TCPClient/TCPClient.java.bak
program_lab1/TCPServer/ChatManager$clientMessageThread.class
program_lab1/TCPServer/ChatManager$userInputThread.class
program_lab1/TCPServer/ChatManager.class
program_lab1/TCPServer/TCPServer.bat
program_lab1/TCPServer/TCPServer.bat.bak
program_lab1/TCPServer/TCPServer.class
program_lab1/TCPServer/TCPServer.java
program_lab1/TCPServer/TCPServer.java.bak
program_lab2/HW#2TCPClient_after.gif
program_lab2/HW#2TCPClient_before.gif
program_lab2/HW#2TCPServer_after.gif
program_lab2/HW#2TCPServer_before.gif
program_lab2/TCPClient/ChattingManager$serverMessageThread.class
program_lab2/TCPClient/ChattingManager$userInputThread.class
program_lab2/TCPClient/ChattingManager.class
program_lab2/TCPClient/TCPClient.bat
program_lab2/TCPClient/TCPClient.bat.bak
program_lab2/TCPClient/TCPClient.class
program_lab2/TCPClient/TCPClient.java
program_lab2/TCPClient/TCPClient.java.bak
program_lab2/TCPClient/TCPClient_report.txt
program_lab2/TCPClient/TCPClient_report.txt.bak
program_lab2/TCPServer/ChatManager$clientMessageThread.class
program_lab2/TCPServer/ChatManager$userInputThread.class
program_lab2/TCPServer/ChatManager.class
program_lab2/TCPServer/TCPServer.bat
program_lab2/TCPServer/TCPServer.bat.bak
program_lab2/TCPServer/TCPServer.class
program_lab2/TCPServer/TCPServer.java
program_lab2/TCPServer/TCPServer.java.bak
program_lab2/TCPServer/TCPServer_Report.txt
program_lab2/TCPServer/TCPServer_Report.txt.bak
program_lab1/HW#1TCPClient_before.gif
program_lab1/HW#1TCPServer_after.gif
program_lab1/HW#1TCPServer_before.gif
program_lab1/TCPClient/ChattingManager$serverMessageThread.class
program_lab1/TCPClient/ChattingManager$userInputThread.class
program_lab1/TCPClient/ChattingManager.class
program_lab1/TCPClient/TCPClient.bat
program_lab1/TCPClient/TCPClient.bat.bak
program_lab1/TCPClient/TCPClient.class
program_lab1/TCPClient/TCPClient.java
program_lab1/TCPClient/TCPClient.java.bak
program_lab1/TCPServer/ChatManager$clientMessageThread.class
program_lab1/TCPServer/ChatManager$userInputThread.class
program_lab1/TCPServer/ChatManager.class
program_lab1/TCPServer/TCPServer.bat
program_lab1/TCPServer/TCPServer.bat.bak
program_lab1/TCPServer/TCPServer.class
program_lab1/TCPServer/TCPServer.java
program_lab1/TCPServer/TCPServer.java.bak
program_lab2/HW#2TCPClient_after.gif
program_lab2/HW#2TCPClient_before.gif
program_lab2/HW#2TCPServer_after.gif
program_lab2/HW#2TCPServer_before.gif
program_lab2/TCPClient/ChattingManager$serverMessageThread.class
program_lab2/TCPClient/ChattingManager$userInputThread.class
program_lab2/TCPClient/ChattingManager.class
program_lab2/TCPClient/TCPClient.bat
program_lab2/TCPClient/TCPClient.bat.bak
program_lab2/TCPClient/TCPClient.class
program_lab2/TCPClient/TCPClient.java
program_lab2/TCPClient/TCPClient.java.bak
program_lab2/TCPClient/TCPClient_report.txt
program_lab2/TCPClient/TCPClient_report.txt.bak
program_lab2/TCPServer/ChatManager$clientMessageThread.class
program_lab2/TCPServer/ChatManager$userInputThread.class
program_lab2/TCPServer/ChatManager.class
program_lab2/TCPServer/TCPServer.bat
program_lab2/TCPServer/TCPServer.bat.bak
program_lab2/TCPServer/TCPServer.class
program_lab2/TCPServer/TCPServer.java
program_lab2/TCPServer/TCPServer.java.bak
program_lab2/TCPServer/TCPServer_Report.txt
program_lab2/TCPServer/TCPServer_Report.txt.bak