public AtticusServerCommunicator(ServerSettings settings) { System.Console.WriteLine("Running AtticusServerRuntime constructor..."); myServerSettings = settings; refreshHardwareLists(); communicatorStatus = ServerStructures.ServerCommunicatorStatus.Disconnected; System.Console.WriteLine("Initializing Network clock broadcast and receiver threads."); DataStructures.Timing.NetworkClockBroadcaster.registerMessageLogHandler(this.messageLog); DataStructures.Timing.NetworkClockBroadcaster.startBroadcasterThreads(); resetNetworkClocks(); DataStructures.Timing.NetworkClockProvider.registerStaticMessageLogHandler(this.messageLog); bool created = DataStructures.Timing.NetworkClockProvider.startListener(DataStructures.Timing.NetworkClockEndpointInfo.HostTypes.Atticus_Server); if (!created) { messageLog(this, new MessageEvent("Unable to start network clock listener. Is it possible that a separate Atticus instance is running on this computer?", 0, MessageEvent.MessageTypes.Error, MessageEvent.MessageCategories.Networking)); } System.Console.WriteLine("... done running AtticusServerRuntime constructor."); }
/// <summary> /// This method start .NET remoting sharing of the server. Intended for use in a non UI thread. /// </summary> private void startMarshalProc() { try { lock (marshalLock) { communicatorStatus = ServerStructures.ServerCommunicatorStatus.Connecting; updateGUI(this, null); tcpChannel = new TcpChannel(5678); ChannelServices.RegisterChannel(tcpChannel, false); objRef = RemotingServices.Marshal(this, "serverCommunicator"); communicatorStatus = ServerStructures.ServerCommunicatorStatus.Connected; } messageLog(this, new MessageEvent("serverCommunicator Marshalled.")); updateGUI(this, null); } catch (Exception e) { messageLog(this, new MessageEvent("Unable to start Marshal due to exception: " + e.Message + e.StackTrace)); displayError(); communicatorStatus = ServerStructures.ServerCommunicatorStatus.Disconnected; updateGUI(this, null); } }
public AtticusServerCommunicator(ServerSettings settings) { System.Console.WriteLine("Running AtticusServerRuntime constructor..."); myServerSettings = settings; refreshHardwareLists(); communicatorStatus = ServerStructures.ServerCommunicatorStatus.Disconnected; // marshal the serverCommunicator if the start up settings say to do so. if (settings.ConnectOnStartup) reachMarshalStatus(ServerStructures.ServerCommunicatorStatus.Connected); System.Console.WriteLine("... done running AtticusServerRuntime constructor."); }