Click to open or copy the CHATSRVR project files.
CHATSRVR, a Windows Sockets Server sample application, is a single-document interface (SDI) application that implements a discussion server for clients of the CHATTER sample.
When you run CHATSRVR, a Discussion dialog box appears that asks for the Channel. The Channel is the number that identifies which discussion you want to support (a single machine could be running multiple discussion servers). Once you provide this information and click OK, the main application window appears.
CHATTER and CHATSRVR could have been written without using a client/server model by having the CHATTER applications send broadcast datagram packets instead of streaming messages to a server. However, this would produce a program with two serious limitations:
This sample demonstrates the following keywords:
AfxMessageBox; CArchive::Flush; CArchive::IsStoring; CCmdUI::Enable; CCmdUI::SetText; CControlBar::EnableDocking; CControlBar::GetBarStyle; CControlBar::SetBarStyle; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CEditView::GetEditCtrl; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CObject::AssertValid; CObject::Dump; CObject::Serialize; CStatusBar::Create; CStatusBar::SetIndicators; CString::GetBuffer; CString::LoadString; CString::ReleaseBuffer; CToolBar::Create; CToolBar::LoadBitmap; CToolBar::SetButtons; CView::GetDocument; CView::OnDraw; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::ExitInstance; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::OnFileNew; CWnd::DoDataExchange; CWnd::GetWindowTextLength; CWnd::OnCreate; SetWindowText; wsprintf