提交 ea49c56d 编写于 作者: X xuchi

客户端采用ipv6

上级 fe3aeec1
@echo off
::::::::::::::::::
::key-val
::字典
::std::map<k,v>
::::::::::::::::::
:: 服务端IP地址,本机ipv6地址,尽量不用vmware开头的虚拟网卡的ipv6地址
set cmd="strIP=fe80::62f9:e02c:efd3:3083%20"
:: 服务端端口
set cmd=%cmd% nPort=4567
:: 工作线程数量
set cmd=%cmd% nThread=1
::每个工作线程,创建多少个客户端
set cmd=%cmd% nClient=1000
::::::数据会先写入发送缓冲区
::::::等待socket可写时才实际发送
:: 每个客户端在nSendSleep(毫秒)时间内
:: 最大可写入nMsg条Login消息
:: 每条消息100字节(Login)
set cmd=%cmd% nMsg=1
set cmd=%cmd% nSendSleep=10
:: 客户端发送缓冲区大小(字节)
set cmd=%cmd% nSendBuffSize=10240
:: 客户端接收缓冲区大小(字节)
set cmd=%cmd% nRecvBuffSize=10240
:: 检查接收到的服务端消息ID是否连续
set cmd=%cmd% -checkMsgID
::::::
::::::
:: 启动程序(客户端程序) 传入参数
EasyClient %cmd%
pause
此差异已折叠。
此差异已折叠。
......@@ -8,8 +8,11 @@
#define FD_SETSIZE 65535 // fd_set集合元素的最大值,集合中实际元素数量不能超过这个最大值
#define WIN32_LEAN_AND_MEAN
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include<windows.h>
#include<WinSock2.h>
#include <windows.h> // wins系统头文件
#include <WinSock2.h>
#include <ws2ipdef.h>
#include <WS2tcpip.h> // 系统库文件名不区分大小写
#pragma comment(lib,"ws2_32.lib")
#else
#ifdef __APPLE__
......
......@@ -23,7 +23,7 @@ namespace doyou {
}
// 初始化socket(客户端程序)
SOCKET InitSocket(int sendSize = SEND_BUFF_SZIE, int recvSize = RECV_BUFF_SZIE)
SOCKET InitSocket(int af, int sendSize = SEND_BUFF_SZIE, int recvSize = RECV_BUFF_SZIE)
{
NetWork::Init();
......@@ -32,7 +32,8 @@ namespace doyou {
CELLLog_Info("warning, initSocket close old socket<%d>...", (int)_pClient->sockfd());
Close();
}
SOCKET sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
_addressFamily = af;
SOCKET sock = socket(af, SOCK_STREAM, IPPROTO_TCP); // ipv4: para1=AF_INET; ipv6: para1=AF_INET6
if (INVALID_SOCKET == sock)
{
CELLLog_PError("create socket failed...");
......@@ -47,27 +48,40 @@ namespace doyou {
return sock;
}
//连接服务器
// 连接服务器
int Connect(const char* ip, unsigned short port)
{
if (!_pClient)
if (!_pClient) // 指针为空-true
{
if (INVALID_SOCKET == InitSocket())
{
return SOCKET_ERROR;
}
CELLLog_PError("_pClient == nullptr"); // 记录错误日志
return SOCKET_ERROR;
}
// 2 连接服务器 connect
sockaddr_in _sin = {};
_sin.sin_family = AF_INET;
_sin.sin_port = htons(port);
int ret = SOCKET_ERROR;
if (AF_INET == _addressFamily) { // ipv4
sockaddr_in sin = {};
sin.sin_family = AF_INET;
sin.sin_port = htons(port);
#ifdef _WIN32
_sin.sin_addr.S_un.S_addr = inet_addr(ip);
#else
_sin.sin_addr.s_addr = inet_addr(ip);
sin.sin_addr.S_un.S_addr = inet_addr(ip);
#else // !windows
sin.sin_addr.s_addr = inet_addr(ip);
#endif
//CELLLog_Info("<socket=%d> connecting <%s:%d>...", (int)_pClient->sockfd(), ip, port);
int ret = connect(_pClient->sockfd(), (sockaddr*)&_sin, sizeof(sockaddr_in));
//CELLLog_Info("<socket=%d> connecting <%s:%d>...", (int)_pClient->sockfd(), ip, port);
ret = connect(_pClient->sockfd(), (sockaddr*)&sin, sizeof(sockaddr_in));
}
else { // ipv6
sockaddr_in6 sin = {}; // 局部变量不要以下划线开头
sin.sin6_family = AF_INET6;
sin.sin6_port = htons(port);
// 将para2数值按照para1格式转换后存储到para3
inet_pton(AF_INET6, ip, &sin.sin6_addr); // inet_pton函数在其标准文本呈现形式中将 IPv4 或 IPv6 Internet 网络地址转换为其数字二进制形式。
ret = connect(_pClient->sockfd(), (sockaddr*)&sin, sizeof(sockaddr_in6)); // para3可替换为sizeof(sin)
}
if (SOCKET_ERROR == ret)
{
CELLLog_PError("<socket=%d> connect <%s:%d> failed...", (int)_pClient->sockfd(), ip, port);
......@@ -164,6 +178,7 @@ namespace doyou {
protected: // 作用域:当前类内部或子类内部
Client* _pClient = nullptr; // 与具体的网络通信模型无关
int _addressFamily = AF_INET; // 协议类型:ipv4或ipv6, 默认ipv4
bool _isConnect = false;
};
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Text Include="Record.txt" />
</ItemGroup>
</Project>
\ No newline at end of file
// 高性能网络通信服务器2.0关键技术点总结DOC
// 开始时间[2023-3-8 to 至今]
// 欲速则不达
// 请按照规范进行标准注释
1.消息缓冲区设置大小应该依据消息size来加以考虑。
2.chatGPT工具高频应用来解决实际问题。具体使用请加以研究,要翻墙。
3.ipv6的详细知识建议大家通过维基百科加以学习。
4.新写函数不能识别,可能是没有添加头文件,可以F1按键,跳转到MSDN进行查看。
5.服务端和客户端要么同时用ipv4, 要么同时用ipv6, 混搭是不行的,比如ipv4客户端是不能链接ipv6服务端。
......@@ -77,6 +77,7 @@
</ItemGroup>
<ItemGroup>
<None Include="..\..\bin\Debug\TcpEasyClient_wins_ipv4.bat" />
<None Include="..\..\bin\Debug\TcpEasyClient_wins_ipv6.bat" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
......
......@@ -23,5 +23,8 @@
<None Include="..\..\bin\Debug\TcpEasyClient_wins_ipv4.bat">
<Filter>头文件</Filter>
</None>
<None Include="..\..\bin\Debug\TcpEasyClient_wins_ipv6.bat">
<Filter>头文件</Filter>
</None>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -170,10 +170,11 @@ void WorkThread(Thread* pThread, int id)
vector<MyClient*> clients(nClient);
// 计算本线程客户端在clients中对应的index
int begin = 0;
// 分析:这种写法在存在余数场景,会导致数据访问越界,直接导致系统崩溃。
// 分析:这种写法在存在余数场景,可能会导致数据访问越界,直接导致系统崩溃。
//int end = nClient / nThread + 1; // 将总客户端平均分配至每一个线程
int end = nClient; // 将总客户端平均分配至每一个线程
for (int n = begin; n < end; n++)
// 分析:当存在余数时,实际实例化客户端数量会比要求的nClient数量少几个
int end = nClient / nThread; // 将总客户端平均分配至每一个线程
for (int n = begin; n < end; ++n)
{
if (!pThread->isRun()) // 安全校验
break;
......@@ -184,11 +185,13 @@ void WorkThread(Thread* pThread, int id)
Thread::Sleep(0);
}
for (int n = begin; n < end; n++)
for (int n = begin; n < end; ++n) // ++i效率更高比i++
{
if (!pThread->isRun())
break;
if (INVALID_SOCKET == clients[n]->InitSocket(nSendBuffSize, nRecvBuffSize))
// 分析:数组元素访问越界,可能直接导致系统崩溃。
//if (INVALID_SOCKET == clients[n]->InitSocket(AF_INET, nSendBuffSize, nRecvBuffSize)) // 使用IPV4
if (INVALID_SOCKET == clients[n]->InitSocket(AF_INET6, nSendBuffSize, nRecvBuffSize)) // 使用IPV6
break;
if (SOCKET_ERROR == clients[n]->Connect(strIP, nPort))
break;
......
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram />
\ No newline at end of file
生成启动时间为 2023/3/8 18:30:54
生成启动时间为 2023/3/12 15:09:25
生成成功。
已用时间 00:00:00.02
已用时间 00:00:00.03
......@@ -11,8 +11,8 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6F51632A-CEC0-44E3-93F5-0757720FA96D}</ProjectGuid>
<RootNamespace>engine10</RootNamespace>
<ProjectGuid>{0B0CA0D9-B821-407F-9772-D0AAB4A7E785}</ProjectGuid>
<RootNamespace>Engine10</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
......
......@@ -7,9 +7,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyServer", "EasyServer\Ea
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyClient", "EasyClient\EasyClient.vcxproj", "{337E0C8A-36D4-428C-98CA-BAB56FA59CE9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Doc", "Doc\Doc.vcxproj", "{40559CAA-9CA1-4DCC-8AB9-8E3E8A23DEA4}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Doc", "Doc", "{65CA60CF-E55B-4A28-8439-3619E04112AA}"
ProjectSection(SolutionItems) = preProject
Doc\Record.txt = Doc\Record.txt
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "engine1.0", "engine1.0\engine1.0.vcxproj", "{6F51632A-CEC0-44E3-93F5-0757720FA96D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Engine1.0", "Engine1.0\Engine1.0.vcxproj", "{0B0CA0D9-B821-407F-9772-D0AAB4A7E785}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -25,14 +28,10 @@ Global
{337E0C8A-36D4-428C-98CA-BAB56FA59CE9}.Debug|Win32.Build.0 = Debug|Win32
{337E0C8A-36D4-428C-98CA-BAB56FA59CE9}.Release|Win32.ActiveCfg = Release|Win32
{337E0C8A-36D4-428C-98CA-BAB56FA59CE9}.Release|Win32.Build.0 = Release|Win32
{40559CAA-9CA1-4DCC-8AB9-8E3E8A23DEA4}.Debug|Win32.ActiveCfg = Debug|Win32
{40559CAA-9CA1-4DCC-8AB9-8E3E8A23DEA4}.Debug|Win32.Build.0 = Debug|Win32
{40559CAA-9CA1-4DCC-8AB9-8E3E8A23DEA4}.Release|Win32.ActiveCfg = Release|Win32
{40559CAA-9CA1-4DCC-8AB9-8E3E8A23DEA4}.Release|Win32.Build.0 = Release|Win32
{6F51632A-CEC0-44E3-93F5-0757720FA96D}.Debug|Win32.ActiveCfg = Debug|Win32
{6F51632A-CEC0-44E3-93F5-0757720FA96D}.Debug|Win32.Build.0 = Debug|Win32
{6F51632A-CEC0-44E3-93F5-0757720FA96D}.Release|Win32.ActiveCfg = Release|Win32
{6F51632A-CEC0-44E3-93F5-0757720FA96D}.Release|Win32.Build.0 = Release|Win32
{0B0CA0D9-B821-407F-9772-D0AAB4A7E785}.Debug|Win32.ActiveCfg = Debug|Win32
{0B0CA0D9-B821-407F-9772-D0AAB4A7E785}.Debug|Win32.Build.0 = Debug|Win32
{0B0CA0D9-B821-407F-9772-D0AAB4A7E785}.Release|Win32.ActiveCfg = Release|Win32
{0B0CA0D9-B821-407F-9772-D0AAB4A7E785}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
生成启动时间为 2023/3/12 23:23:39。
1>项目“E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\EasyClient\EasyClient.vcxproj”在节点 2 上(Rebuild 个目标)。
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(388,5): warning MSB8028: The intermediate directory (E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\tmp\Debug\) contains files shared from another project (EasyServer.vcxproj). This can lead to incorrect clean and rebuild behavior.
1>ClCompile:
D:\software\VC\bin\CL.exe /c /I..\Depends\include /ZI /nologo /W3 /WX- /sdl- /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\tmp\Debug\\" /Fd"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\tmp\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt client.cpp
client.cpp
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(70): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\time.inl(112) : 参见“localtime”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(71): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(356) : 参见“sprintf”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(74): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(356) : 参见“sprintf”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(78): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(211) : 参见“fopen”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\easyclient\client.cpp(118): warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\easyclient\client.cpp(213): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\string.h(112) : 参见“strcpy”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\easyclient\client.cpp(214): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\string.h(112) : 参见“strcpy”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\easyclient\client.cpp(305): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(283) : 参见“scanf”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(197): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\time.inl(112) : 参见“localtime”的声明
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(99): 参见对正在编译的函数 模板 实例化“void doyou::io::Log::EchoReal<const char*>(bool,const char *,const char *,const char *)”的引用
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(91): 参见对正在编译的函数 模板 实例化“void doyou::io::Log::PError<const char*>(const char *,const char *)”的引用
Link:
D:\software\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\Debug\EasyClient.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\Debug\EasyClient.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\Debug\EasyClient.lib" /MACHINE:X86 "E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\tmp\Debug\client.obj"
EasyClient.vcxproj -> E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\Debug\EasyClient.exe
1>已完成生成项目“E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\EasyClient\EasyClient.vcxproj”(Rebuild 个目标)的操作。
生成成功。
已用时间 00:00:01.27
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\vc120.pdb
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\vc120.idb
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\client.obj
e:\files\技术doc\engine2.0\engine2.0\engine2.0\bin\debug\easyclient.ilk
e:\files\技术doc\engine2.0\engine2.0\engine2.0\bin\debug\easyclient.exe
e:\files\技术doc\engine2.0\engine2.0\engine2.0\bin\debug\easyclient.pdb
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\debug\easyclient.pdb
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\debug\easyclient.exe
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\\..\bin\debug\easyclient.ilk
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyclient.tlog\cl.command.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyclient.tlog\cl.read.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyclient.tlog\cl.write.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyclient.tlog\link.command.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyclient.tlog\link.read.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyclient.tlog\link.write.1.tlog
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\ENGINE2.0\EASYCLIENT\CLIENT.CPP
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\ENGINE2.0\EASYCLIENT\CLIENT.CPP
#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
Debug|Win32|E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\|
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\ENGINE2.0\EASYCLIENT\CLIENT.CPP
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\TMP\DEBUG\CLIENT.OBJ
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\TMP\DEBUG\CLIENT.OBJ
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\TMP\DEBUG\CLIENT.OBJ
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\vc120.pdb
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\vc120.idb
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyserver.tlog\cl.command.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyserver.tlog\cl.read.1.tlog
e:\files\技术doc\engine2.0\engine2.0\engine2.0\tmp\debug\easyserver.tlog\cl.write.1.tlog
生成启动时间为 2023/3/12 16:18:47。
1>项目“E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\EasyServer\EasyServer.vcxproj”在节点 2 上(Rebuild 个目标)。
1>ClCompile:
D:\software\VC\bin\CL.exe /c /I..\Depends\include /ZI /nologo /W3 /WX- /sdl- /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../tmp/Debug\\" /Fd"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../tmp/Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt server.cpp
server.cpp
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(70): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\time.inl(112) : 参见“localtime”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(71): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(356) : 参见“sprintf”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(74): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(356) : 参见“sprintf”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(78): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(211) : 参见“fopen”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\server.hpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\fdset.hpp(112): warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\tcpserver.hpp(159): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\string.h(168) : 参见“strerror”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\iocpserver.hpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\tcpiocpserver.hpp(88): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\string.h(168) : 参见“strerror”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\easyserver\server.cpp(203): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\stdio.h(283) : 参见“scanf”的声明
1>e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(197): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\software\vc\include\time.inl(112) : 参见“localtime”的声明
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(99): 参见对正在编译的函数 模板 实例化“void doyou::io::Log::EchoReal<const char*>(bool,const char *,const char *,const char *)”的引用
e:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\depends\include\log.hpp(91): 参见对正在编译的函数 模板 实例化“void doyou::io::Log::PError<const char*>(const char *,const char *)”的引用
Link:
D:\software\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../bin/Debug\EasyServer.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../bin/Debug\EasyServer.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../bin/Debug\EasyServer.lib" /MACHINE:X86 "E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../tmp/Debug\server.obj"
EasyServer.vcxproj -> E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\../bin/Debug\EasyServer.exe
1>已完成生成项目“E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\EasyServer\EasyServer.vcxproj”(Rebuild 个目标)的操作。
生成成功。
已用时间 00:00:02.19
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\ENGINE2.0\EASYSERVER\SERVER.CPP
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\ENGINE2.0\EASYSERVER\SERVER.CPP
#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
Debug|Win32|E:\files\技术doc\engine2.0\engine2.0\engine2.0\engine2.0\|
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\ENGINE2.0\EASYSERVER\SERVER.CPP
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\TMP\DEBUG\SERVER.OBJ
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\TMP\DEBUG\SERVER.OBJ
B^E:\FILES\技术DOC\ENGINE2.0\ENGINE2.0\ENGINE2.0\TMP\DEBUG\SERVER.OBJ
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册