QsoWaitForIOCompletion()--Wait for I/O Operation


  Syntax
 #include <gskssl.h>
 #include <qsoasync.h

 int QsoWaitForIOCompletion (int IOCompletionPort,
 Qso_OverlappedIO_t * completionStatus,
 struct timeval * timeToWait)

        

  Service Program Name: QSOSRV3

  Default Public Authority: *USE

  Threadsafe: Yes

The QsoWaitForIOCompletion() is used to wait for a completed overlapped I/O operation. The wait point is represented by the I/O completion port that was created using the QsoCreateIOCompletionPort() function.


Parameters

int IOCompletionPort
(Input) The I/O completion port on which to wait.

Qso_OverlappedIO_t * completionStatus
(Input/Output) A pointer to a qso_overlappedIO_t structure that will be updated with the status defined below. If a field has no relevance to operation completed, then either a null or zero will be returned for that field.

errnoValue
(Output) If operationCompleted is QSOPOSTIOCOMPLETION, QSOSTARTSEND, QSOSTARTRECV or QSOSTARTACCEPT and returnValue is negative, this field will contain an errno value further defining the error. This is also true if operationCompleted is GSKSECURESOCSTARTINIT, GSKSECURESOCSTARTSEND or GSKSECURESOCSTARTRECV and returnValue is GSK_ERROR_IO.

Possible values are:

If operationCompleted is QSOPOSTIOCOMPLETION:

If operationCompleted is QSOSTARTRECV or GSKSECURESOCSTARTRECV:

If operationCompleted is QSOSTARTSEND or GSKSECURESOCSTARTSEND:

If operationCompleted is QSOSTARTACCEPT:

If operationCompleted is GSKSECURESOCSTARTINIT:

Any errno that can be returned by send() or recv() can be returned by this API if operationCompleted is GSKSECURESOCSTARTINIT. See Sockets APIs for a description of the errno values they return.

If an errno is returned that is not in this list, see Errno Values for UNIX®-Type Functions for a description of the errno.

struct timeval * timeToWait
(Input) A pointer to a timeval structure that contains the time in seconds and microseconds for which the QsoWaitForIOCompletion() call should block if there is no completion status to receive.

If this parameter is null, QsoWaitForIOCompletion() waits indefinitely. If this value is specified, and 0 seconds 0 microseconds are specified, QsoWaitForIOCompletion() returns immediately.


Authorities

Authorization of *R (allow access to the object) to the certificate store file and its associated files is required. Authorization of *X (allow use of the object) to each directory of the path name of the certificate store file and its associated files is required.


Return Values

QsoWaitForIOCompletion returns an integer. Possible value are:



Errno Conditions

When QsoWaitForIOCompletion fails, errno can be set to one of the following:



Error Messages



Usage Notes

  1. An errno of EDESTROYED indicates that the thread was waiting on the I/O completion port at the time that it was destroyed by another thread. When an I/O completion port is destroyed, all buffers that are associated with outstanding overlapped I/O operations are immediately available for use by the application program.

  2. The application should first check the return value of the QsoWaitForIOCompletion() call to determine if the Qso_OverlappedIO_t structure specified by the completionStatus parameter has been updated. This structure is updated ONLY if the return value of the QsoWaitForIOCompletion() call is one (1).

Related Information



API introduced: V5R1

[ Back to top | UNIX-Type APIs | APIs by category ]