private void RunWrite() { try { while (!_stop) { RawPDU rawPdu; if (_pduQueue.Dequeue(out rawPdu)) { SendRawPDU(rawPdu); } } } catch (Exception e) { OnNetworkError(e, true); if (NetworkError != null) NetworkError(e); CloseNetwork(0); } }