mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
Nullable
This commit is contained in:
@ -61,7 +61,6 @@ public class PacketServer : IResource
|
||||
}
|
||||
|
||||
public event DestroyedEvent OnDestroy;
|
||||
public event PropertyModifiedEvent PropertyModified;
|
||||
|
||||
public void Destroy()
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -104,7 +104,6 @@ public class DistributedServer : NetworkServer<DistributedConnection>, IResource
|
||||
set;
|
||||
}
|
||||
|
||||
public event PropertyModifiedEvent PropertyModified;
|
||||
|
||||
public AsyncReply<bool> Trigger(ResourceTrigger trigger)
|
||||
{
|
||||
|
@ -24,6 +24,6 @@ namespace Esiur.Net.Packets
|
||||
Referrer = 15,
|
||||
Time = 16,
|
||||
Certificate = 17,
|
||||
IPv4 = 18
|
||||
IPAddress = 18,
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user