資源簡(jiǎn)介
任務(wù)說明書
局域網(wǎng)語音聊天(TCP)
基本要求:
1、通過麥克風(fēng)進(jìn)行一對(duì)一語音聊天;
2、通信協(xié)議采用TCP;
3、聊天PC是互連的PC中的任意兩臺(tái);
4、設(shè)計(jì)界面參考MSN。

代碼片段和文件信息
//?ChatSocket.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“gsmCodec.h“
#include?“ChatSocket.h“
//#include?“GsmCodecDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChatSocket
template
CChatSocket::CChatSocket()
{
}
template
CChatSocket::~CChatSocket()
{
}
//?Do?not?edit?the?following?lines?which?are?needed?by?ClassWizard.
#if?0
BEGIN_MESSAGE_MAP(CChatSocket?CSocket)
//{{AFX_MSG_MAP(CChatSocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif //?0
/////////////////////////////////////////////////////////////////////////////
//?CChatSocket?member?functions
template
void?CChatSocket::SetParent(T?*pWndParent)
{
m_pParent?=?pWndParent;
}
//受到數(shù)據(jù)包
template
void?CChatSocket::OnReceive(int?nErrorCode)?
{
int?nLen=Receive(m_chBufBUFFER_SIZE);
if(nLen>=sizeof(MSGHEAD))
{
MSGHEAD*?head=(MSGHEAD*)m_chBuf;
if(m_pParent)
{
if(head->magic==MAGIC
&&?(int)(head->uLen+sizeof(MSGHEAD))==nLen)
{
((T*)m_pParent)->OnReceive(m_chBufnLen);
}
}
}
CSocket::OnReceive(nErrorCode);
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????1265??2004-07-22?15:28??TCP語音聊天\TCP語音聊天1\ChatSocket.cpp
?????文件???????2376??2004-07-22?15:46??TCP語音聊天\TCP語音聊天1\ChatSocket.h
?????文件???????2492??2004-03-17?22:42??TCP語音聊天\TCP語音聊天1\config.h
?????文件???????2492??2004-03-17?22:42??TCP語音聊天\TCP語音聊天1\configMS.h
?????文件???????6800??2004-02-28?16:30??TCP語音聊天\TCP語音聊天1\Esdll.lib
?????文件??????21420??2005-01-17?18:09??TCP語音聊天\TCP語音聊天1\gsmCodec.aps
?????文件???????1636??2005-01-17?18:30??TCP語音聊天\TCP語音聊天1\gsmCodec.clw
?????文件???????2183??2004-04-22?23:05??TCP語音聊天\TCP語音聊天1\gsmCodec.cpp
?????文件???????5193??2004-07-23?15:26??TCP語音聊天\TCP語音聊天1\gsmCodec.dsp
?????文件????????539??2004-04-22?09:49??TCP語音聊天\TCP語音聊天1\gsmCodec.dsw
?????文件???????1346??2004-04-22?09:49??TCP語音聊天\TCP語音聊天1\gsmCodec.h
?????文件?????254976??2005-01-17?18:30??TCP語音聊天\TCP語音聊天1\gsmCodec.ncb
?????文件?????153088??2005-01-17?18:30??TCP語音聊天\TCP語音聊天1\gsmCodec.opt
?????文件????????250??2005-01-17?18:17??TCP語音聊天\TCP語音聊天1\gsmCodec.plg
?????文件???????5913??2005-01-15?14:08??TCP語音聊天\TCP語音聊天1\gsmCodec.rc
?????文件??????19792??2005-01-13?21:55??TCP語音聊天\TCP語音聊天1\gsmCodecDlg.cpp
?????文件???????3601??2004-07-23?14:58??TCP語音聊天\TCP語音聊天1\gsmCodecDlg.h
?????文件????????289??2004-02-26?18:18??TCP語音聊天\TCP語音聊天1\MelpDef.h
?????文件???????3726??2004-03-12?11:02??TCP語音聊天\TCP語音聊天1\Mp3DecLib.lib
?????文件??????82622??2004-04-27?11:53??TCP語音聊天\TCP語音聊天1\mpglib.lib
?????文件???????1078??2004-04-22?09:49??TCP語音聊天\TCP語音聊天1\res\gsmCodec.ico
?????文件????????400??2004-04-22?09:49??TCP語音聊天\TCP語音聊天1\res\gsmCodec.rc2
????..A.SH.??????3072??2005-01-13?20:12??TCP語音聊天\TCP語音聊天1\res\Thumbs.db
?????目錄??????????0??2005-01-13?23:57??TCP語音聊天\TCP語音聊天1\res
?????文件???????1053??2005-01-13?21:44??TCP語音聊天\TCP語音聊天1\resource.h
?????文件????????210??2004-04-22?09:49??TCP語音聊天\TCP語音聊天1\StdAfx.cpp
?????文件???????1757??2004-04-23?21:01??TCP語音聊天\TCP語音聊天1\StdAfx.h
?????文件???????3192??2004-02-26?18:18??TCP語音聊天\TCP語音聊天1\va_g729a.h
?????文件??????96396??2004-02-26?18:18??TCP語音聊天\TCP語音聊天1\va_g729a.lib
?????文件????????562??2004-07-23?14:08??TCP語音聊天\TCP語音聊天1\WaveCodec.cpp
............此處省略16個(gè)文件信息
評(píng)論
共有 條評(píng)論