⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mysocket.cpp

📁 网上搜的关于语音聊天的语音聊天系统
💻 CPP
字号:
// mysocket.cpp: implementation of the mysocket class.
//
//////////////////////////////////////////////////////////////////////
#include<afxwin.h>
#include<afxsock.h>
#include "mysocket.h"
#include "Serdlg.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

mysocket::mysocket()
{
name="";
}

mysocket::~mysocket()
{

}

void mysocket::setparent(CDialog *dialog)
{
dlg=dialog;
}


//
// This function will be called when the client connects to
// the Server.
//

void mysocket::OnAccept(int errcode)
{
	if(errcode==0)
	((Serdlg*)dlg)->Accept();

	CSocket::OnAccept(errcode);
}

//
// This function is gets invoked when the socket recieves the
// data from the remote socket
//

void mysocket::OnReceive(int errcode)
{
	
	if(errcode==0)
	((Serdlg*)dlg)->Receive(this);

	CSocket::OnAccept(errcode);
}

void mysocket::OnClose(int errcode)
{
	if(errcode==0)
	((Serdlg*)dlg)->OnCloseClient(this);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -