2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2024-11-09 01:46:00 +03:00
parent 2006c47013
commit 2dc373770c
30 changed files with 155 additions and 114 deletions

View File

@ -61,7 +61,6 @@ public class PacketServer : IResource
}
public event DestroyedEvent OnDestroy;
public event PropertyModifiedEvent PropertyModified;
public void Destroy()
{

View File

@ -206,7 +206,8 @@ public partial class DistributedConnection : NetworkConnection, IStore
{
base.Assign(socket);
session.LocalHeaders[IIPAuthPacketHeader.IPv4] = socket.RemoteEndPoint.Address.Address;
session.LocalHeaders[IIPAuthPacketHeader.IPAddress] = socket.RemoteEndPoint.Address.GetAddressBytes();
if (socket.State == SocketState.Established &&
session.AuthenticationType == AuthenticationType.Client)
{

View File

@ -104,7 +104,6 @@ public class DistributedServer : NetworkServer<DistributedConnection>, IResource
set;
}
public event PropertyModifiedEvent PropertyModified;
public AsyncReply<bool> Trigger(ResourceTrigger trigger)
{

View File

@ -24,6 +24,6 @@ namespace Esiur.Net.Packets
Referrer = 15,
Time = 16,
Certificate = 17,
IPv4 = 18
IPAddress = 18,
}
}

View File

@ -122,8 +122,8 @@ namespace Esiur.Net.Sockets
await ws.ConnectAsync(url, new CancellationToken());
sock.ReceiveAsync(websocketReceiveBufferSegment, CancellationToken.None)
_ = sock.ReceiveAsync(websocketReceiveBufferSegment, CancellationToken.None)
.ContinueWith(NetworkReceive);
return true;
@ -236,6 +236,8 @@ namespace Esiur.Net.Sockets
var receivedLength = task.Result.Count;
totalReceived += receivedLength;
receiveNetworkBuffer.Write(websocketReceiveBuffer, 0, (uint)receivedLength);
Receiver?.NetworkReceive(this, receiveNetworkBuffer);