示例#1
0
        public static string LastErrorString(int errorcode = 0)
        {
            if (errorcode == 0)
            {
                errorcode = Native.zmq_errno();
            }
            var errormsgptr = zmq_strerror(errorcode);

            return(Marshal.PtrToStringAnsi(errormsgptr));
        }
示例#2
0
        /// <summary>
        /// Should be called when a native zmq function returns error (-1)
        /// </summary>
        public static void ThrowZmqError(string context = null)
        {
            var error = Native.zmq_errno();

            ThrowZmqError(error, context);
        }
示例#3
0
        public static int LastError()
        {
            var error = Native.zmq_errno();

            return(error);
        }