• 大小: 70KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: C/C++
  • 标签: vc++  tcp  client+serve  

资源简介

vc++程序 ,含客户端和服务器端,类似聊天软件,服务器一直开着,开几个客户端(客户端可不在同一台电脑上),实现聊天.内有源代码及使用说明.比较简单的基础代码,将编译的debug,release删除了,文件大小比较小,基于dialog的.

资源截图

代码片段和文件信息

// MyTcpClientsly.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “MyTcpClientsly.h“
#include “MyTcpClientslyDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMyTcpClientslyApp

BEGIN_MESSAGE_MAP(CMyTcpClientslyApp CWinApp)
//{{AFX_MSG_MAP(CMyTcpClientslyApp)
// 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()

/////////////////////////////////////////////////////////////////////////////
// CMyTcpClientslyApp construction

CMyTcpClientslyApp::CMyTcpClientslyApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CMyTcpClientslyApp object

CMyTcpClientslyApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CMyTcpClientslyApp initialization

BOOL CMyTcpClientslyApp::InitInstance()
{
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

WSADATA wsd;
WSAStartup(MAKEWORD(22)&wsd);

CMyTcpClientslyDlg 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;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      36412  2010-04-22 14:01  TCP client+server\MyTcpClient\MyTcpClientsly.aps

     文件       1549  2010-04-22 14:08  TCP client+server\MyTcpClient\MyTcpClientsly.clw

     文件       2228  2010-04-22 11:35  TCP client+server\MyTcpClient\MyTcpClientsly.cpp

     文件       4303  2010-04-22 09:45  TCP client+server\MyTcpClient\MyTcpClientsly.dsp

     文件        551  2010-04-22 09:45  TCP client+server\MyTcpClient\MyTcpClientsly.dsw

     文件       1412  2010-04-22 09:45  TCP client+server\MyTcpClient\MyTcpClientsly.h

     文件      58368  2010-04-22 14:08  TCP client+server\MyTcpClient\MyTcpClientsly.ncb

     文件      55808  2010-04-22 14:08  TCP client+server\MyTcpClient\MyTcpClientsly.opt

     文件        262  2010-04-22 14:01  TCP client+server\MyTcpClient\MyTcpClientsly.plg

     文件       5882  2010-04-22 14:01  TCP client+server\MyTcpClient\MyTcpClientsly.rc

     文件       6103  2010-04-22 13:38  TCP client+server\MyTcpClient\MyTcpClientslyDlg.cpp

     文件       1669  2010-04-22 10:13  TCP client+server\MyTcpClient\MyTcpClientslyDlg.h

     文件       3723  2010-04-22 09:45  TCP client+server\MyTcpClient\ReadMe.txt

     文件       1078  2010-04-22 09:45  TCP client+server\MyTcpClient\res\MyTcpClientsly.ico

     文件        406  2010-04-22 09:45  TCP client+server\MyTcpClient\res\MyTcpClientsly.rc2

     文件        968  2010-04-22 09:52  TCP client+server\MyTcpClient\resource.h

     文件        216  2010-04-22 09:45  TCP client+server\MyTcpClient\StdAfx.cpp

     文件       1054  2010-04-22 09:45  TCP client+server\MyTcpClient\StdAfx.h

     文件      36176  2010-04-22 14:00  TCP client+server\MyTcpServer\MyTcpServersly.aps

     文件       1404  2010-04-22 14:03  TCP client+server\MyTcpServer\MyTcpServersly.clw

     文件       2225  2010-04-22 11:34  TCP client+server\MyTcpServer\MyTcpServersly.cpp

     文件       4303  2010-04-22 10:23  TCP client+server\MyTcpServer\MyTcpServersly.dsp

     文件        551  2010-04-22 10:23  TCP client+server\MyTcpServer\MyTcpServersly.dsw

     文件       1412  2010-04-22 10:23  TCP client+server\MyTcpServer\MyTcpServersly.h

     文件      58368  2010-04-22 14:03  TCP client+server\MyTcpServer\MyTcpServersly.ncb

     文件      54784  2010-04-22 14:03  TCP client+server\MyTcpServer\MyTcpServersly.opt

     文件        848  2010-04-22 14:03  TCP client+server\MyTcpServer\MyTcpServersly.plg

     文件       5654  2010-04-22 14:00  TCP client+server\MyTcpServer\MyTcpServersly.rc

     文件       6060  2010-04-22 14:00  TCP client+server\MyTcpServer\MyTcpServerslyDlg.cpp

     文件       1698  2010-04-22 13:59  TCP client+server\MyTcpServer\MyTcpServerslyDlg.h

............此处省略17个文件信息

评论

共有 条评论