Beispiel #1
0
 /// <summary>
 /// Run the communication machine
 /// </summary>
 public void Run()
 {
     m_BlockchainStore = new BlockchainStore();
     Network.INetworkAgentAPI _newNetwork = new CommunicationEngine(m_BlockchainStore);
     m_Agent = new AgentAPI.AgentServices(m_BlockchainStore, _newNetwork, Log);
     _newNetwork.initP2PServer();
 }
Beispiel #2
0
 /// <summary>
 /// Run the communication machine
 /// </summary>
 public async Task Run(int p2pPortNumber, int _AgentHTTPServerPortNumber)
 {
     try
     {
         m_BlockchainStore     = new BlockchainStore(Log);
         m_CommunicationEngine = new CommunicationEngine(m_BlockchainStore, p2pPortNumber, Log);
         m_Agent = new AgentAPI.AgentServices(m_BlockchainStore, m_CommunicationEngine, _AgentHTTPServerPortNumber, Log);
         await m_CommunicationEngine.InitP2PServerAsync();
     }
     catch (Exception ex)
     {
         Log($"The aplikcation has been handled by the exception {ex}");
     }
 }