nn_strerror.adoc 783 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. nn_strerror(3)
  2. ==============
  3. NAME
  4. ----
  5. nn_strerror - convert an error number into human-readable string
  6. SYNOPSIS
  7. --------
  8. *#include <nanomsg/nn.h>*
  9. *const char *nn_strerror (int 'errnum');*
  10. DESCRIPTION
  11. -----------
  12. Converts error number (errno) into a human-readable string. As opposed to
  13. 'strerror(3)' this function handles nanomsg-specific errors in addition
  14. to standard system errors.
  15. RETURN VALUE
  16. ------------
  17. Return error message string.
  18. ERRORS
  19. ------
  20. No errors are defined.
  21. EXAMPLE
  22. -------
  23. ----
  24. rc = nn_send (s, "ABC", 3, 0);
  25. if (rc < 0)
  26. printf ("nn_send failed: %s\n", nn_strerror (errno));
  27. ----
  28. SEE ALSO
  29. --------
  30. <<nn_errno#,nn_errno(3)>>
  31. <<nn_symbol#,nn_symbol(3)>>
  32. <<nanomsg#,nanomsg(7)>>
  33. AUTHORS
  34. -------
  35. link:mailto:sustrik@250bpm.com[Martin Sustrik]