示例#1
0
 private void OnConnected(RemoteNode remoteNode)
 {
     lock (connectedPeers)
     {
         connectedPeers.Add(remoteNode);
     }
     remoteNode.Disconnected      += RemoteNode_Disconnected;
     remoteNode.InventoryReceived += RemoteNode_InventoryReceived;
     remoteNode.PeersReceived     += RemoteNode_PeersReceived;
     remoteNode.StartProtocol();
 }
示例#2
0
 private void OnConnected(RemoteNode remoteNode)
 {
     BhpLog.WriteLine($"LocalNode accept RemoteNode: {remoteNode.RemoteEndpoint.ToString()}");
     lock (connectedPeers)
     {
         connectedPeers.Add(remoteNode);
     }
     remoteNode.Disconnected      += RemoteNode_Disconnected;
     remoteNode.InventoryReceived += RemoteNode_InventoryReceived;
     remoteNode.PeersReceived     += RemoteNode_PeersReceived;
     remoteNode.StartProtocol();
 }