示例#1
0
 /// <summary>
 /// Isolates the node from the network.
 /// </summary>
 static public void isolate()
 {
     NetworkClientManager.isolate();
     if (PresenceList.myPresenceType == 'W')
     {
         Logging.info("Network server is not enabled in worker mode.");
         NetworkServer.stopNetworkOperations();
     }
     else
     {
         NetworkServer.restartNetworkOperations();
     }
 }
示例#2
0
        /// <summary>
        /// Disconnects and reconnects the node to the network.
        /// </summary>
        static public void reconnect()
        {
            // Reconnect server and clients

            // Reset the network receive queue
            NetworkQueue.reset();

            if (PresenceList.myPresenceType == 'W')
            {
                Logging.info("Network server is not enabled in worker mode.");
                NetworkServer.stopNetworkOperations();
            }
            else
            {
                NetworkServer.restartNetworkOperations();
            }

            NetworkClientManager.restartClients();
        }