TCP客户端与服务器
TCP客户端与服务器通讯的链接实现了聊天室
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 21500 2015-01-08 11:48 CR18_20150107_张亚洲ClientClient.aps
文件 1360 2015-01-08 12:01 CR18_20150107_张亚洲ClientClient.clw
文件 2712 2015-01-04 13:40 CR18_20150107_张亚洲ClientClient.cpp
文件 4159 2015-01-04 11:33 CR18_20150107_张亚洲ClientClient.dsp
文件 1461 2015-01-04 13:40 CR18_20150107_张亚洲ClientClient.h
文件 246 2015-01-08 12:04 CR18_20150107_张亚洲ClientClient.plg
文件 6097 2015-01-07 21:33 CR18_20150107_张亚洲ClientClient.rc
文件 12580 2015-01-08 12:00 CR18_20150107_张亚洲ClientClientDlg.cpp
文件 1903 2015-01-08 11:48 CR18_20150107_张亚洲ClientClientDlg.h
文件 3579 2015-01-04 11:33 CR18_20150107_张亚洲ClientReadMe.txt
文件 1078 2015-01-04 11:33 CR18_20150107_张亚洲Client
esClient.ico
文件 398 2015-01-04 11:33 CR18_20150107_张亚洲Client
esClient.rc2
文件 960 2015-01-07 11:11 CR18_20150107_张亚洲Client
esource.h
文件 208 2015-01-04 11:33 CR18_20150107_张亚洲ClientStdAfx.cpp
文件 1257 2015-01-08 11:50 CR18_20150107_张亚洲ClientStdAfx.h
文件 3579 2015-01-04 11:32 CR18_20150107_张亚洲ServerReadMe.txt
文件 1078 2015-01-04 11:32 CR18_20150107_张亚洲Server
esServer.ico
文件 398 2015-01-04 11:32 CR18_20150107_张亚洲Server
esServer.rc2
文件 776 2015-01-05 22:47 CR18_20150107_张亚洲Server
esource.h
文件 20816 2015-01-06 12:56 CR18_20150107_张亚洲ServerServer.aps
文件 1165 2015-01-07 11:55 CR18_20150107_张亚洲ServerServer.clw
文件 2782 2015-01-04 13:25 CR18_20150107_张亚洲ServerServer.cpp
文件 4159 2015-01-04 11:32 CR18_20150107_张亚洲ServerServer.dsp
文件 734 2015-01-04 11:33 CR18_20150107_张亚洲ServerServer.dsw
文件 1455 2015-01-04 13:24 CR18_20150107_张亚洲ServerServer.h
文件 140288 2015-01-08 12:21 CR18_20150107_张亚洲ServerServer.ncb
文件 67584 2015-01-08 12:21 CR18_20150107_张亚洲ServerServer.opt
文件 246 2015-01-08 12:21 CR18_20150107_张亚洲ServerServer.plg
文件 5347 2015-01-06 11:51 CR18_20150107_张亚洲ServerServer.rc
文件 14173 2015-01-08 12:20 CR18_20150107_张亚洲ServerServerDlg.cpp
............此处省略38个文件信息
// Client.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Client.h“
#include “ClientDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClientApp
BEGIN_MESSAGE_MAP(CClientApp CWinApp)
//{{AFX_MSG_MAP(CClientApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CClientApp construction
CClientApp::CClientApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CClientApp object
CClientApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CClientApp initialization
BOOL CClientApp::InitInstance()
{
//加载套接字版本
wVersionRequested = MAKEWORD( 2 2 );
err = WSAStartup( wVersionRequested &wsaData );
if ( err != 0 ) {
/* Tell the user that we could not find a usable */
/* WinSock DLL. */
return FALSE;
}
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CClientDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
int CClientApp::ExitInstance()
{
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 2 ) {
/* Tell the user that we could not find a usable */
/* WinSock DLL. */
WSACleanup( );
return FALSE;
}
return CWinApp::ExitInstance();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 21500 2015-01-08 11:48 CR18_20150107_张亚洲ClientClient.aps
文件 1360 2015-01-08 12:01 CR18_20150107_张亚洲ClientClient.clw
文件 2712 2015-01-04 13:40 CR18_20150107_张亚洲ClientClient.cpp
文件 4159 2015-01-04 11:33 CR18_20150107_张亚洲ClientClient.dsp
文件 1461 2015-01-04 13:40 CR18_20150107_张亚洲ClientClient.h
文件 246 2015-01-08 12:04 CR18_20150107_张亚洲ClientClient.plg
文件 6097 2015-01-07 21:33 CR18_20150107_张亚洲ClientClient.rc
文件 12580 2015-01-08 12:00 CR18_20150107_张亚洲ClientClientDlg.cpp
文件 1903 2015-01-08 11:48 CR18_20150107_张亚洲ClientClientDlg.h
文件 3579 2015-01-04 11:33 CR18_20150107_张亚洲ClientReadMe.txt
文件 1078 2015-01-04 11:33 CR18_20150107_张亚洲Client
esClient.ico
文件 398 2015-01-04 11:33 CR18_20150107_张亚洲Client
esClient.rc2
文件 960 2015-01-07 11:11 CR18_20150107_张亚洲Client
esource.h
文件 208 2015-01-04 11:33 CR18_20150107_张亚洲ClientStdAfx.cpp
文件 1257 2015-01-08 11:50 CR18_20150107_张亚洲ClientStdAfx.h
文件 3579 2015-01-04 11:32 CR18_20150107_张亚洲ServerReadMe.txt
文件 1078 2015-01-04 11:32 CR18_20150107_张亚洲Server
esServer.ico
文件 398 2015-01-04 11:32 CR18_20150107_张亚洲Server
esServer.rc2
文件 776 2015-01-05 22:47 CR18_20150107_张亚洲Server
esource.h
文件 20816 2015-01-06 12:56 CR18_20150107_张亚洲ServerServer.aps
文件 1165 2015-01-07 11:55 CR18_20150107_张亚洲ServerServer.clw
文件 2782 2015-01-04 13:25 CR18_20150107_张亚洲ServerServer.cpp
文件 4159 2015-01-04 11:32 CR18_20150107_张亚洲ServerServer.dsp
文件 734 2015-01-04 11:33 CR18_20150107_张亚洲ServerServer.dsw
文件 1455 2015-01-04 13:24 CR18_20150107_张亚洲ServerServer.h
文件 140288 2015-01-08 12:21 CR18_20150107_张亚洲ServerServer.ncb
文件 67584 2015-01-08 12:21 CR18_20150107_张亚洲ServerServer.opt
文件 246 2015-01-08 12:21 CR18_20150107_张亚洲ServerServer.plg
文件 5347 2015-01-06 11:51 CR18_20150107_张亚洲ServerServer.rc
文件 14173 2015-01-08 12:20 CR18_20150107_张亚洲ServerServerDlg.cpp
............此处省略38个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)