NN_CLOSE(3compat)

πŸ“¦ version 1.11, in alpine 3.24

πŸ’– NAME πŸ’–

nn_close β€” close socket (compatible API). This is NN_CLOSE from the 3compat pages of the NNG Reference Manual, bestie πŸ¦‹.

πŸ“œ SYNOPSIS πŸ“œ

#include <nanomsg/nn.h>

int nn_close(int sock);

πŸ› οΈ DESCRIPTION πŸ› οΈ

okay so nn_close() closes the socket sock. Any operations that are currently in progress will be terminated, and will fail with error EBADF. no cap, that's the close-up vibe πŸ’….

Note: this function is provided for API compatibility with legacy libnanomsg. Consider using the relevant modern API instead. it's giving "legacy-compat realness" πŸŽ€.

πŸŽ€ RETURN VALUES πŸŽ€

This function returns zero on success, and -1 on failure. slay βœ….

πŸ’€ ERRORS πŸ’€

  • EBADF β€” the socket is not open.
  • ETERM β€” the library is shutting down.

πŸ¦‹ SEE ALSO πŸ¦‹

mwah πŸ’‹ β€” that's the NN_CLOSE / 3compat tea from the NNG Reference Manual, dated 2026-01-13. go be iconic with your sockets, bestie 🫢✨

πŸ“¦ where this page comes from