📄 natsvr.h
字号:
#ifndef _NATSVR_H
#define _NATSVR_H
#include "natpacket.h"
#ifdef _WIN32
#include <winsock.h>
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
typedef int socklen_t;
#define close closesocket
#define ioctl ioctlsocket
#define EINPROGRESS WSAEWOULDBLOCK
static int getSocketError() { return WSAGetLastError(); }
#else
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <signal.h>
#include <sys/time.h>
#include <ctype.h>
#include <syslog.h>
#include <pthread.h>
#include <fcntl.h>
#include <errno.h>
#include <semaphore.h>
#include <time.h>
#include "md5.h"
static int getSocketError()
{
return errno;
}
#endif
#define NIPQUAD(addr) \
((unsigned char *)&addr)[0], \
((unsigned char *)&addr)[1], \
((unsigned char *)&addr)[2], \
((unsigned char *)&addr)[3]
#ifndef MAX_PATH
#define MAX_PATH 256
#endif
extern BOOL g_bFinished;
#endif // _NATSVR_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -