먼저 Stdafx.h 맨 아래 줄에 #include "afxsock.h" 추가한다. InitInstance() 함수에 CWinApp::InitInstance(); if (!AfxSocketInit()) { AfxMessageBox(_T("소켓 초기화 실패")); return FALSE; } ... 추가한다. 그런 다음 #include "ServerSocket.h" #include "DataSocket.h" ... // 멤버 변수로 선언 CServerSocket m_ServerSocket; CDataSocket m_DataSocket; ... // ServerSocket 초기화 m_ServerSocket.Init(this, 2000); ... // 메시지 처리기 만들어야 함, 헤더 파일에 다음 추가 afx..