ZMQ_HAS(3)

✨ ZMQ_HAS(3) ✨

okay bestie, welcome to the 0MQ Manual β€” this is the page for zmq_has, and it's literally so cute and useful, you're gonna be obsessed. 🫢


🌸 NAME 🌸

zmq_has β€” check a ZMQ capability πŸ‘‘


πŸ’… SYNOPSIS πŸ’…

int zmq_has (const char *capability);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the zmq_has() function shall report whether a specified capability is available in the library. that's it, that's the whole vibe. it lets bindings and applications probe a library directly, for transport and security options. no cap, it's giving "let me check before I commit" energy and honestly? iconic. ✨

capabilities shall be lowercase strings β€” lowercase only, bestie, don't be yelling at it. πŸ’€ the following capabilities are defined:

  • ipc β€” the library supports the ipc:// protocol 🌈
  • pgm β€” the library supports the pgm:// protocol 🌈
  • tipc β€” the library supports the tipc:// protocol 🌈
  • norm β€” the library supports the norm:// protocol 🌈
  • curve β€” the library supports the CURVE security mechanism πŸ”
  • gssapi β€” the library supports the GSSAPI security mechanism πŸ”
  • draft β€” the library is built with the draft api 🧚

and here's the lil detail that matters: when this method is provided, the zmq.h header file will define ZMQ_HAS_CAPABILITIES. so if you see that macro, you know zmq_has is in the building. πŸ’–


⭐ RETURN VALUE ⭐

  • the zmq_has() function shall return 1 if the specified capability is provided. slay. βœ…
  • otherwise it shall return 0. πŸ™ˆ

that's it. 1 or 0. binary queen behavior, periodt. πŸ’…


πŸŽ€ AUTHORS πŸŽ€

this page was written by the 0MQ community. 🫢 to make a change please read the 0MQ Contribution Policy at http://www.zeromq.org/docs:contributing.


bestie reminder: capabilities are lowercase strings and the return is strictly 1 (provided) or 0 (not provided). don't overthink it, just vibe check the library. 🌸

okay that's the whole page, love u, go probe some capabilities πŸ’–βœ¨ β€” this was the 0MQ manual for ZMQ_HAS(3), source 0MQ 4.3.5, dated 10/09/2023, and that's the sign-off, mwah πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from