public bool Listen(TimeSpan?timeout) { try { NN.Poll(_sockets, _ct, _results, _pollfds, timeout); return(true); } catch (Exception e) { Console.WriteLine("DEBUG: Poll threw exception, ignoring: " + e); Thread.Sleep(TimeSpan.FromSeconds(1)); // This shouldn't ever happen, but when it does (!), this prevents a screen full of text. } finally { for (int i = 0; i < _ct; ++i) { if (_results[i] != 0) { ReceivedMessage?.Invoke(_sockets[i]); } } } return(false); }
public NanomsgException() : this(null, NN.Errno()) { }
public NanomsgException(string customError) : this(customError, NN.Errno()) { }