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-07-09 11:18:53 +03:00
parent cd7063ceb4
commit 279b5f87e6
13 changed files with 30 additions and 22 deletions

View File

@ -1502,7 +1502,7 @@ public partial class DistributedConnection : NetworkConnection, IStore
}
catch (Exception ex)
{
Console.WriteLine(ex);
Global.Log(ex);
}
finally
{
@ -1654,7 +1654,7 @@ public partial class DistributedConnection : NetworkConnection, IStore
var link = DC.ToBytes(r.DistributedResourceLink);
Console.WriteLine("Restoreing " + r.DistributedResourceLink);
Global.Log("DistributedConnection", LogType.Debug, "Restoreing " + r.DistributedResourceLink);
try
{
@ -1683,7 +1683,7 @@ public partial class DistributedConnection : NetworkConnection, IStore
await Fetch(id, null);
Console.WriteLine("Restored " + id);
Global.Log("DistributedConnection", LogType.Debug, "Restored " + id);
}
}
catch (AsyncException ex)

View File

@ -601,8 +601,9 @@ partial class DistributedConnection
{
// reply failed
//SendParams(0x80, r.Instance.Id, r.Instance.Age, r.Instance.Serialize(false, this));
Console.WriteLine("Not found " + resourceId);
Global.Log("DistributedConnection", LogType.Debug, "Not found " + resourceId);
SendError(ErrorType.Management, callback, (ushort)ExceptionCode.ResourceNotFound);
}
});

View File

@ -413,7 +413,7 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan
/// <returns>Indicator when the property is set.</returns>
protected object _SetSync(byte index, object value)
{
Console.WriteLine("Setting..." + index + " " + value);
//Console.WriteLine("Setting..." + index + " " + value);
if (destroyed)
throw new Exception("Trying to access a destroyed object.");
@ -433,7 +433,7 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan
var rt = _Set(index, value).Wait();
Console.WriteLine("Done Setting");
//Console.WriteLine("Done Setting");
return rt;
}

View File

@ -145,7 +145,7 @@ public abstract class NetworkServer<TConnection> : IDestructible where TConnecti
}
catch (Exception ex)
{
Console.WriteLine(ex);
Global.Log(ex);
}
}
}));
@ -210,7 +210,7 @@ public abstract class NetworkServer<TConnection> : IDestructible where TConnecti
}
finally
{
Console.WriteLine("Server@{0} is down", port);
Global.Log("NetworkServer", LogType.Warning, $"Server@{port} is down.");
}
}

View File

@ -207,8 +207,8 @@ public class WebsocketPacket : Packet
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Console.WriteLine(offset + "::" + data.ToHex());
Global.Log(ex);
Global.Log("WebsocketPacket", Core.LogType.Debug, offset + "::" + data.ToHex());
throw ex;
}
}

View File

@ -458,7 +458,7 @@ public class TCPSocket : ISocket
}
catch (Exception ex)
{
Console.WriteLine(ex);
Global.Log(ex);
}
finally
{

View File

@ -316,7 +316,9 @@ public class WSocket : ISocket, INetworkReceiver<ISocket>
}
else
Console.WriteLine("Unknown WS opcode:" + pkt_receive.Opcode);
{
Global.Log("WSocket", LogType.Debug, "Unknown WS opcode:" + pkt_receive.Opcode);
}
if (offset == msg.Length)
{