Retrieves the symbol name and value at index i. Indices start at 0. An index has no significance to its associated symbol; the mappings may change between library versions.
Typically a client will iterate through the symbols until nn_symbol returns NULL in order to collect all the symbols.
All symbols exposed by nn_symbol are available directly in the C API, generally as preprocessor macros. Thus, this function is useful mostly for language bindings that cant parse the header file and rely on retrieving the symbols in the runtime.
Note that the NN_MSG symbol is not exported by the nn_symbol function. First, it is a pointer rather than an integer; second, the symbol is not supposed to be exported from language bindings to the user. Instead, language bindings should provide the zero-copy functionality in a language-specific way, if at all (zero-copy functionality may not make sense for some languages/bindings).
If i is valid, returns the name of the symbol at that index. If the pointer value is not NULL, the symbols value is stored there.
If i is out-of-range, nn_symbol returns NULL and sets errno to EINVAL.