Get the status of the previous call to nbaconnect()
#include <sys/socket.h> int nbaconnect_result( int fd, int * error );
- The file descriptor returned by nbaconnect().
- A pointer to a location where the function can store the status.
Use the -l socket option to qcc to link against this library.
The nbaconnect_result() function gets the status of the previous nbaconnect() call when an fd was returned. Since nbaconnect_result() is a blocking call, it's best to test the status of the fd with a call to select() to verify that the file descriptor is ready to be read.
The fd is always closed by this function whether or not there's a status to report.
- The call was successful; error contains the status.
- An error occurred while obtaining the status.
Any value from the Errors section in connect(), as well as:
- Invalid fd.
- There's no data, or not enough data, from the fd.
Last modified: 2014-11-17