Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/n/nbaconnect_result.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/n/nbaconnect_result.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/n/nbaconnect_result.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/n/nbaconnect_result.html on line 8

nbaconnect_result()

Get the status of the previous call to nbaconnect()

Synopsis:

#include <sys/socket.h>

int nbaconnect_result( int fd,
                       int * error );

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

See also:

connect(), nbaconnect(), select()

autoconnect in the Utilities Reference.


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/n/nbaconnect_result.html on line 165

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/n/nbaconnect_result.html on line 165