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

📄 p2pfiletransfer.cpp

📁 缓冲 缓冲 缓冲 缓冲 缓冲 缓冲
💻 CPP
字号:
#include "stdafx.h"

#include "Peer.h"

#ifdef WIN32
#include <winsock2.h>
#endif

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

void startup(void (*f)(void*)=0, void* p=0) {
#ifdef WIN32
	/*negotiation of socket version*/
	WORD wVersionRequested;
	WSADATA wsaData;
	int err;
	wVersionRequested = MAKEWORD(1,1);
	err =WSAStartup(wVersionRequested,&wsaData);
	if(err!=0)
		return;
	if((LOBYTE(wsaData.wVersion)!=1)||(HIBYTE(wsaData.wVersion)!=1))
	{
		WSACleanup();
		return;
	}
#endif
	Peer self;
	self.init();
}

void shutdown() {
}


int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
	int nRetCode = 0;

	// initialize MFC and print and error on failure
//	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
//	{
		// TODO: change error code to suit your needs
	//	cerr << _T("Fatal Error: MFC initialization failed") << endl;
	//	nRetCode = 1;
//	}
//	else
//	{
		// TODO: code your application's behavior here.
        startup();
//	}

	return nRetCode;
}

⌨️ 快捷键说明

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