[bitcoin/bitcoin] Use C++ language binding for ZMQ (#13957)

@jmcorgan: The main point where I think the C++ wrapper improves readability and robustness is through type-safety and RAII. Instead of passing around `void*` for the ZMQ context and socket, you have a typed object (e.g. `zmq::socket_t`). And instead of manually calling an initialiser and a destructor for it, this is done by the language — including a guarantee that the destructor is called, which might be forgotten when using the pure C API (especially with things like multiple returns in a function or exceptions).

If there is no longer a big reason not to depend on the C++ wrapper, then I can simply prepare a PR that changes to it and then we can judge based on that how much it simplifies the code (or not).

Добавить комментарий