private void SendMessage() { if ((Enabled) && (!string.IsNullOrEmpty(_message))) { if (_communicationHandler == null) { OpenCommunicationHandler(); } else { try { _communicationHandler.SendData(_message); } catch { _communicationHandler.Close(); _communicationHandler = null; } } _millisecondsToNextSend = SendInterval; } }
private void OpenCommunicationHandler() { try { _communicationHandler = new Communication.CommunicationHandler(); _communicationHandler.CommsCallback = CommsEventCallback; _communicationHandler.MyID = OwnPlayerRaceID; _communicationHandler.Open(); } catch { if (_communicationHandler != null) { _communicationHandler.Close(); _communicationHandler = null; } } }
private void SendMessage() { if ((Enabled) && (!string.IsNullOrEmpty(_message))) { if (_communicationHandler == null) { OpenCommunicationHandler(); } else { try { _communicationHandler.SendData(_message); } catch { _communicationHandler.Close(); _communicationHandler = null; } } _millisecondsToNextSend = SendInterval; } }
private void OpenCommunicationHandler() { try { _communicationHandler = new Communication.CommunicationHandler(); _communicationHandler.CommsCallback = CommsEventCallback; _communicationHandler.MyID = OwnPlayerRaceID; _communicationHandler.Open(); } catch { if (_communicationHandler != null) { _communicationHandler.Close(); _communicationHandler = null; } } }