📄 clientstreamsock.cpp
字号:
// ClientStreamSock.cpp : implementation file
//
#include "stdafx.h"
#include "RemoteTalk.h"
#include "ClientStreamSock.h"
#include "RemoteTalkDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClientStreamSock
CClientStreamSock::CClientStreamSock()
{
}
CClientStreamSock::~CClientStreamSock()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CClientStreamSock, CAsyncSocket)
//{{AFX_MSG_MAP(CClientStreamSock)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CClientStreamSock member functions
void CClientStreamSock::OnConnect(int nErrorCode)
{
CRemoteTalkDlg* pDlg=(CRemoteTalkDlg*)::AfxGetMainWnd();
if (nErrorCode==0)
{
pDlg->m_ClientCtrlSock.Connect(pDlg->m_strIPAddr,1500);
}
else
{
AfxMessageBox("can't connect to server!");
}
// TODO: Add your specialized code here and/or call the base class
CAsyncSocket::OnConnect(nErrorCode);
}
void CClientStreamSock::OnReceive(int nErrorCode)
{
CRemoteTalkDlg* pDlg=(CRemoteTalkDlg*)::AfxGetMainWnd();
// TODO: Add your specialized code here and/or call the base class
CAsyncSocket::OnReceive(nErrorCode);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -