zeromq / clrzmq4

ZeroMQ C# namespace (.NET and mono, Windows, Linux and MacOSX, x86 and amd64)
GNU Lesser General Public License v3.0
241 stars 112 forks source link

Error codes are confusing and partially wrong #94

Closed sigiesec closed 7 years ago

sigiesec commented 7 years ago

There are public static members with the error codes in ZError.Code as well as in ZError.Code.Posix that contain error codes. In addition, there are public static members of ZError of type ZError. Something is done in the static initializer of ZError.Code.

Which should be used by users of the library? If possible, it would be great if there were constants, which, if they are platform-specific, can be fixed at compile-time.

In addition, the values are not correct, at least on Windows. For example, EPROTONOSUPPORT is 135 (it is defined in errno.h at least in the Windows 10 SDK) rather than HAUSNUMERO + 2. It is only defined as such in zmq.h when it is not defined before.