private void OnConnected(RemoteNode remoteNode) { lock (connectedPeers) { connectedPeers.Add(remoteNode); } remoteNode.Disconnected += RemoteNode_Disconnected; remoteNode.InventoryReceived += RemoteNode_InventoryReceived; remoteNode.PeersReceived += RemoteNode_PeersReceived; remoteNode.StartProtocol(); }
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(); }