소개글
멀티 채팅 서버-클라이언트 프로그램입니다.동시에 여러명이 접속 가능하고, 여러 방을 개설,
다대다 채팅 프로그램입니다.
윈속2.2에서 Overlapped IO 모델을 적용하였고,
쓰레드를 이용하였습니다.
컴파일 실행환경
Visual C++ 6.0 에서 제작하였습니다.본문내용
class CSChatCliDlg : public CDialog{
// Construction
public:
CString strServerAddr; // 서버 주소
int GetUserOfRoom(int RoomNo); // 방에 있는 사용자 수 리턴
void ExitRoom(); // 방에서 나가기
void Refresh(); // 새로고침
void EnterRoom(); // 대화방에 들어가기
CDlgChat* pDlgChat; // 채팅 다이얼로그 포인터
CString strMyName; // 클라이언트 닉네임
int iMyIndex; // 나의 인덱스 번호
void SendData(int type, LPVOID lpvoid = NULL, LPVOID lpvoid2 = NULL); // 데이터 보내기
void Connect(); // 접속하기
ROOM_INFO RoomInfo[MAX_ROOM]; // 대화방 정보
USER_INFO UserInfo[MAX_USER]; // 접속자 정보
BYTE RoomID[MAX_ROOM]; // 리스트상에 있는 방과 실제 배열의 Index
BYTE UserID[MAX_USER]; // 리스트상에 있는 유저와 실제 배열의 Index
WSADATA wsaData; // 윈속 초기화를 위한 구조체
SOCKET ClientSocket; // 클라이언트 소켓
SOCKADDR_IN ServerAddr;
압축파일 내 파일목록
SChatCli/DataStruct.h
SChatCli/DlgChat.cpp
SChatCli/DlgChat.h
SChatCli/DlgConnect.cpp
SChatCli/DlgConnect.h
SChatCli/DlgMakeRoom.cpp
SChatCli/DlgMakeRoom.h
SChatCli/DlgReset.cpp
SChatCli/DlgReset.h
SChatCli/ReadMe.txt
SChatCliRelease
SChatCli/resource.h
SChatCli/SChatCli.aps
SChatCli/SChatCli.clw
SChatCli/SChatCli.cpp
SChatCli/SChatCli.dsp
SChatCli/SChatCli.dsw
SChatCli/SChatCli.h
SChatCli/SChatCli.ncb
SChatCli/SChatCli.opt
SChatCli/SChatCli.plg
SChatCli/SChatCli.rc
SChatCli/SChatCliDlg.cpp
SChatCli/SChatCliDlg.h
SChatCli/StdAfx.cpp
SChatCli/StdAfx.h
SChatCli/res/Alien4 meni_resdown.wav
SChatCli/res/SChatCli.ico
SChatCli/res/SChatCli.rc2
SChatCli/res/Sonic Restart Point.wav
SChatSvr/DataStruct.h
SChatSvrDebug
SChatSvr/ReadMe.txt
SChatSvr/resource.h
SChatSvr/SChatSvr.aps
SChatSvr/SChatSvr.clw
SChatSvr/SChatSvr.cpp
SChatSvr/SChatSvr.dsp
SChatSvr/SChatSvr.dsw
SChatSvr/SChatSvr.h
SChatSvr/SChatSvr.ncb
SChatSvr/SChatSvr.opt
SChatSvr/SChatSvr.plg
SChatSvr/SChatSvr.rc
SChatSvr/SChatSvrDlg.cpp
SChatSvr/SChatSvrDlg.h
SChatSvr/StdAfx.cpp
SChatSvr/StdAfx.h
SChatSvr/res/SChatSvr.ico
SChatSvr/res/SChatSvr.rc2
SChatCli/DlgChat.cpp
SChatCli/DlgChat.h
SChatCli/DlgConnect.cpp
SChatCli/DlgConnect.h
SChatCli/DlgMakeRoom.cpp
SChatCli/DlgMakeRoom.h
SChatCli/DlgReset.cpp
SChatCli/DlgReset.h
SChatCli/ReadMe.txt
SChatCliRelease
SChatCli/resource.h
SChatCli/SChatCli.aps
SChatCli/SChatCli.clw
SChatCli/SChatCli.cpp
SChatCli/SChatCli.dsp
SChatCli/SChatCli.dsw
SChatCli/SChatCli.h
SChatCli/SChatCli.ncb
SChatCli/SChatCli.opt
SChatCli/SChatCli.plg
SChatCli/SChatCli.rc
SChatCli/SChatCliDlg.cpp
SChatCli/SChatCliDlg.h
SChatCli/StdAfx.cpp
SChatCli/StdAfx.h
SChatCli/res/Alien4 meni_resdown.wav
SChatCli/res/SChatCli.ico
SChatCli/res/SChatCli.rc2
SChatCli/res/Sonic Restart Point.wav
SChatSvr/DataStruct.h
SChatSvrDebug
SChatSvr/ReadMe.txt
SChatSvr/resource.h
SChatSvr/SChatSvr.aps
SChatSvr/SChatSvr.clw
SChatSvr/SChatSvr.cpp
SChatSvr/SChatSvr.dsp
SChatSvr/SChatSvr.dsw
SChatSvr/SChatSvr.h
SChatSvr/SChatSvr.ncb
SChatSvr/SChatSvr.opt
SChatSvr/SChatSvr.plg
SChatSvr/SChatSvr.rc
SChatSvr/SChatSvrDlg.cpp
SChatSvr/SChatSvrDlg.h
SChatSvr/StdAfx.cpp
SChatSvr/StdAfx.h
SChatSvr/res/SChatSvr.ico
SChatSvr/res/SChatSvr.rc2