端口映射源码C++(转) 2010-08-23 18:59:00| 分类: 默认分类 |举报|字号 订阅 // rr.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include #include #pragma comment(lib, "ws2_32.lib") #define SERVERNAME "ZXPortMap" #define VERSION "v1.1" #define MAXBUFSIZE 8192 #define ADDRSIZE 32 struct SOCKINFO { SOCKET ClientSock; SOCKET ServerSock; }; struct ADDRESS { char szIP[ADDRS IZE]; WORD wPort; SOCKET s; }; IZE]; WORD wPort; SOCKET s; };