This commit is contained in:
EonaCat 2023-03-25 16:16:54 +01:00
parent 4767d7604c
commit 2ca8cb31dc
6 changed files with 10 additions and 14 deletions

View File

@ -18,9 +18,9 @@
<PackageTags>EonaCat, Network, .NET Standard, EonaCatHelpers, Jeroen, Saey, Protocol, Quic, UDP, TCP, Web, Server</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<Description>EonaCat Networking library with Quic, TCP, UDP and a Webserver</Description>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.0.5</AssemblyVersion>
<FileVersion>1.0.0.5</FileVersion>
<Version>1.0.6</Version>
<AssemblyVersion>1.0.0.6</AssemblyVersion>
<FileVersion>1.0.0.6</FileVersion>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

View File

@ -1,7 +1,7 @@
using System.Net;
using System.Net.Sockets;
namespace EonaCat.Dns.Core.Sockets
namespace EonaCat.Network
{
public class RemoteInfo
{

View File

@ -4,7 +4,7 @@ using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace EonaCat.Dns.Core.Sockets.Tcp
namespace EonaCat.Network
{
public class SocketTcpClient
{

View File

@ -3,7 +3,7 @@ using System.Net;
using System;
using System.Threading.Tasks;
namespace EonaCat.Dns.Core.Sockets.Tcp
namespace EonaCat.Network
{
public class SocketTcpServer
{

View File

@ -3,7 +3,7 @@ using System.Net;
using System.Threading.Tasks;
using System;
namespace EonaCat.Dns.Core.Sockets.Udp
namespace EonaCat.Network
{
public class SocketUdpClient
{
@ -78,7 +78,7 @@ namespace EonaCat.Dns.Core.Sockets.Udp
{
if (endPoint is IPEndPoint ipEndPoint)
{
await udpClient.SendAsync(data, ipEndPoint).AsTask().ConfigureAwait(false);
await udpClient.SendAsync(data, data.Length, ipEndPoint).ConfigureAwait(false);
OnSend?.Invoke(endPoint, data);
}
}

View File

@ -1,15 +1,11 @@
using System.Net.Sockets;
using System.Net;
using System.Text;
using System;
using System.Runtime.InteropServices;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
using Microsoft.AspNetCore.DataProtection;
using static SQLite.SQLite3;
using System.ComponentModel;
namespace EonaCat.Dns.Core.Sockets.Udp
namespace EonaCat.Network
{
public class SocketUdpServer
{
@ -94,7 +90,7 @@ namespace EonaCat.Dns.Core.Sockets.Udp
{
if (endPoint is IPEndPoint ipEndPoint)
{
await udpClient.SendAsync(data, ipEndPoint).AsTask().ConfigureAwait(false);
await udpClient.SendAsync(data, data.Length, ipEndPoint).ConfigureAwait(false);
OnSend?.Invoke(new RemoteInfo() { EndPoint = endPoint, Data = data, IsIpv6 = endPoint.AddressFamily == AddressFamily.InterNetworkV6 });
}
}