nbaconnect_result()

Get the status of the previous call to nbaconnect()

Synopsis:

#include <sys/socket.h>

int nbaconnect_result( int fd,
                       int * error );

Since:

BlackBerry 10.0.0

Arguments:

fd
The file descriptor returned by nbaconnect().
error
A pointer to a location where the function can store the status.

Library:

libsocket

Use the -l socket option to qcc to link against this library.

Description:

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.

When there's data available, the status is put in error, which may be any of the errno values set by connect() during an attempt to make a non-blocking connection.

The fd is always closed by this function whether or not there's a status to report.

Returns:

0
The call was successful; error contains the status.
-1
An error occurred while obtaining the status.

Errors:

Any value from the Errors section in connect(), as well as:

EBADF
Invalid fd.
ENOMSG
There's no data, or not enough data, from the fd.

Classification:

QNX Neutrino

Safety:  
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus