public void SetOption(ZContextOption option, int optionValue) { EnsureNotDisposed(); int rc = zmq.ctx_set(_contextPtr, (Int32)option, optionValue); if (rc == -1) { var error = ZError.GetLastErr(); if (error == ZError.EINVAL) { throw new ArgumentOutOfRangeException( string.Format("The requested option optionName \"{0}\" is invalid.", option)); } throw new ZException(error); } }
public int GetOption(ZContextOption option) { EnsureNotDisposed(); int rc = zmq.ctx_get(_contextPtr, (Int32)option); if (rc != -1) { return(rc); } var error = ZError.GetLastErr(); if (Equals(error, ZError.EINVAL)) { throw new ArgumentOutOfRangeException( $"The requested option optionName \"{option}\" is invalid."); } throw new ZException(error); }
public void SetOption(ZContextOption option, int optionValue) { EnsureNotDisposed(); int rc = zmq.ctx_set(_contextPtr, (Int32)option, optionValue); if (rc == -1) { var error = ZError.GetLastErr(); if (error == ZError.EINVAL) { throw new ArgumentOutOfRangeException( string.Format("The requested option optionName \"{0}\" is invalid.", option)); } throw new ZException(error); } }