跨平台C++ 功能全面的Socket类库,支持TCP,UDP,限
速等等
跨平台C++ 功能全面的Socket类库,支持TCP,UDP,限速等等
(2005-05-26 11:48:28)转载▼ #ifndef _MY_UTIL_
#define _MY_UTIL_ #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/timeb.h>#pragma warning(disable:4786) #include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <deque>
#include <set>
#include <utility>
#include <hash_map>
using namespace std;#ifdef WIN32
#define _WIN32_WINNT 0x0501
#include <windows.h>
#include <process.h>
#include <winsock.h> #define socklen_t int
//WINDOWS
#define bzero(a,b) (memset((a),0,(b))) #define
EWOULDBLOCK WSAEWOULDBLOCK #define
EINPROGRESS WSAEINPROGRESS #define
EALREADY WSAEALREADY #define
ENOTSOCK WSAENOTSOCK #define
EDESTADDRREQ WSAEDESTADDRREQ
#define
EMSGSIZE WSAEMSGSIZE #define
EPROTOTYPE WSAEPROTOTYPE #define
ENOPROTOOPT WSAENOPROTOOPT #define
EPROTONOSUPPORT WSAEPROTONOSUPPORT #define
ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT #define
EOPNOTSUPP
相关推荐: