Пример #1
0
        public OutgoingConnection(NodeSocketData nodeSocketData, NodeConfig nodeConfig)
        {
            this.nodeConfig = nodeConfig;
            this.nodeSocketData = nodeSocketData;
            updateTimer = new Timer(TimerCallback, null, 0, Constants.Network_UpdateFrequencyMS);

            Connect();
        }
Пример #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()));
 }
Пример #3
0
 public static string GetString(NodeSocketData nsd)
 {
     return "Node : " + nsd.Name + " | " + nsd.PublicKey.ToString();//.Substring(0,8);
 }