[zeromq-dev] Socket type

john skaller skaller at users.sourceforge.net
Mon Jan 16 10:29:47 CET 2012


Why is a socket a void*, instead of

	struct zmq_socket_type_t* // incomplete type *

? 

The above helps to prevent type errors by preventing conversions from
and to any pointer type other than void* (in C) (at least without a cast).
In C++ you get extra safety (C++ doesn't allow conversion from a void*).

--
john skaller
skaller at users.sourceforge.net







More information about the zeromq-dev mailing list