public OutgoingConnection(NodeSocketData nodeSocketData, NodeConfig nodeConfig)
        {
            this.nodeConfig = nodeConfig;
            this.nodeSocketData = nodeSocketData;
            updateTimer = new Timer(TimerCallback, null, 0, Constants.Network_UpdateFrequencyMS);

            Connect();
        }
Beispiel #2
0
 public PeerData(NodeSocketData socketInfo, NodeState nodeState, NodeConfig nodeConfig)
 {
     this.IP = socketInfo.IP;
     this.ListenPort = socketInfo.ListenPort;
     this.PubKey = socketInfo.PublicKey;
     this.Name = socketInfo.Name;
     TimeStamp = nodeState.NetworkTime;
     Signature = new Hash(nodeConfig.SignDataWithPrivateKey(signableData()));
 }
 public static string GetString(NodeSocketData nsd)
 {
     return "Node : " + nsd.Name + " | " + nsd.PublicKey.ToString();//.Substring(0,8);
 }