GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NN_ERRNO (3)

.ds Aq ’

NAME

nn_errno - retrieve the current errno

CONTENTS

SYNOPSIS

#include <nanomsg/nn.h>

int nn_errno (void);

DESCRIPTION

Returns value of errno for the current thread.

On most systems, errno can be accessed directly and this function is not needed. However, on Windows, there are multiple implementations of the CRT library (single-threaded, multi-threaded, release, debug) and each of them has its own instance of errno. Thus, if nanomsg library and the application that uses it link with different versions of CRT library, they don\(cqt share same instance of errno. Consequently, error codes set by nanomsg cannot be accessed by the application. To overcome this problem, application can use nn_errno() function to retrieve the nanomsg\(cqs value of errno.

RETURN VALUE

Returns value of errno for the current thread.

ERRORS

No errors are defined.

EXAMPLE

rc = nn_send (s, "ABC", 3, 0);
if (rc < 0)
    printf ("nn_send failed with error code %d\n", nn_errno ());

SEE ALSO

nn_strerror(3) nanomsg(7)

AUTHORS

Martin Sustrik <\m[blue]sustrik@250bpm.com\m[][1]>

NOTES

1. sustrik@250bpm.com  mailto:sustrik@250bpm.com
Search for    or go to Top of page |  Section 3 |  Main Index


nanomsg Unknown NN_ERRNO (3) 03/17/2016

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.