diff --git a/DCacheCore/Node/ServerNode.cs b/DCacheCore/Node/ServerNode.cs index 6c8f839..529610d 100644 --- a/DCacheCore/Node/ServerNode.cs +++ b/DCacheCore/Node/ServerNode.cs @@ -3,11 +3,14 @@ using NetSockets; using System.Text; using System.Net; +using System.Security.Cryptography; namespace DCache { public class ServerNode: Node { + private static string password = "secret"; + // TODO: use DI to get this implementation private NetPayloadServer SocketHandler { set; get; } @@ -19,7 +22,15 @@ public ServerNode(int portNum, string host = API.LOCAL_HOST) SocketHandler.OnReceived += new NetClientReceivedEventHandler(ProcessCommand); StartMulticast(); - MulticastSend($"[{API.NOTIFY}={{'source_node_id':'{ID}','source_port':'{Convert.ToInt32(portNum)}','source_host':'{host}'}}]"); + // create a weak hash . + var md5 = MD5.Create(); + + try + { + MulticastSend($"[{API.NOTIFY}={{'source_node_id':'{ID}','source_port':'{Convert.ToInt32(portNum)}','source_host':'{host}'}}]"); + } catch(Exception ee) { + } + } void ProcessCommand(object sender, NetClientReceivedEventArgs e)