Skip to content

Commit

Permalink
update AnTCP
Browse files Browse the repository at this point in the history
  • Loading branch information
Jnnshschl committed Jan 6, 2024
1 parent 003f784 commit d7d0d9b
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions AmeisenNavigation.Server/AmeisenNavigation.Server.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,31 @@
<OutDir>build\$(Platform)\$(Configuration)\</OutDir>
<IntDir>build\$(Platform)\int\$(Configuration)\</IntDir>
<TargetName>AmeisenNavigationServer</TargetName>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Configuration)\x86\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Platform)\$(Configuration)\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)dep\AnTCP.Server\include\;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>build\$(Platform)\$(Configuration)\</OutDir>
<IntDir>build\$(Platform)\int\$(Configuration)\</IntDir>
<TargetName>AmeisenNavigationServer</TargetName>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Configuration)\x86\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Platform)\$(Configuration)\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)dep\AnTCP.Server\include\;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>build\$(Platform)\$(Configuration)\</OutDir>
<IntDir>build\$(Platform)\int\$(Configuration)\</IntDir>
<TargetName>AmeisenNavigationServer</TargetName>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Configuration)\x64\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Platform)\$(Configuration)\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)dep\AnTCP.Server\include\;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>build\$(Platform)\$(Configuration)\</OutDir>
<IntDir>build\$(Platform)\int\$(Configuration)\</IntDir>
<TargetName>AmeisenNavigationServer</TargetName>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Configuration)\x64\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<LibraryPath>$(SolutionDir)dep\AnTCP.Server\lib\$(Platform)\$(Configuration)\;$(SolutionDir)AmeisenNavigation\build\$(Platform)\$(Configuration)\;$(SolutionDir)recastnavigation\build\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)dep\AnTCP.Server\include\;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down
2 changes: 1 addition & 1 deletion AmeisenNavigation.Tester/AmeisenNavigation.Tester.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AnTCP.Client" Version="1.0.0" />
<PackageReference Include="AnTCP.Client" Version="1.1.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
</ItemGroup>

Expand Down
Binary file removed dep/AnTCP.Client.1.0.0.nupkg
Binary file not shown.
11 changes: 5 additions & 6 deletions dep/AnTCP.Server/include/AnTcpServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ class ClientHandler
/// <returns>True if data was sent, false if not.</returns>
inline bool SendData(AnTcpMessageType type, const void* data, size_t size) const noexcept
{
const size_t packetSize = size + sizeof(AnTcpMessageType);
return send(Socket, reinterpret_cast<const char*>(&packetSize), static_cast<int>(sizeof(decltype(packetSize))), 0) != SOCKET_ERROR
&& send(Socket, &type, static_cast<int>(sizeof(AnTcpMessageType)), 0) != SOCKET_ERROR
&& send(Socket, static_cast<const char*>(data), static_cast<int>(size), 0) != SOCKET_ERROR;
const int packetSize = size + static_cast<int>(sizeof(AnTcpMessageType));
return send(Socket, reinterpret_cast<const char*>(&packetSize), sizeof(decltype(packetSize)), 0) != SOCKET_ERROR
&& send(Socket, &type, sizeof(AnTcpMessageType), 0) != SOCKET_ERROR
&& send(Socket, static_cast<const char*>(data), size, 0) != SOCKET_ERROR;
}

/// <summary>
Expand Down Expand Up @@ -342,8 +342,7 @@ class AnTcpServer
inline void Stop() noexcept
{
ShouldExit = true;
closesocket(ListenSocket);
ListenSocket = INVALID_SOCKET;
SocketCleanup();
Clients.clear();
WSACleanup();
}
Expand Down
Binary file removed dep/AnTCP.Server/lib/Debug/x64/AnTCP.Server.lib
Binary file not shown.
Binary file removed dep/AnTCP.Server/lib/Debug/x86/AnTCP.Server.lib
Binary file not shown.
Binary file removed dep/AnTCP.Server/lib/Release/x64/AnTCP.Server.lib
Binary file not shown.
Binary file removed dep/AnTCP.Server/lib/Release/x86/AnTCP.Server.lib
Binary file not shown.

0 comments on commit d7d0d9b

Please sign in to comment.