#include <gskssl.n> #include <qsoasync.h int QsoWaitForIOCompletion (int IOCompletionPort, Qso_OverlappedIO_t * completionStatus, struct timeval * timeToWait)
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.
descriptorHandle | (Ouput) The descriptor handle that was supplied
by the application when the operation was started. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
buffer | (Ouput) A pointer to the buffer that was supplied
when the operation was started. Null is returned when operationCompleted is
QSOSTARTACCEPT or
GSKSECURESOCSTARTINIT . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bufferLength | (Ouput) The length of the buffer that was
supplied when the operation was started. Zero is returned when
operationCompleted is QSOSTARTACCEPT or GSKSECURESOCSTARTINIT. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
postFlag | (Ouput) The value of the postFlag when the
operation was started. Zero is returned when operationCompleted is
QSOSTARTACCEPT or
GSKSECURESOCSTARTINIT . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fillBuffer | (Ouput) The value of the fillBuffer when the
operation was started. Zero is returned when operationCompleted is
QSOSTARTACCEPT or
GSKSECURESOCSTARTINIT . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
returnValue | (Output)
Possible values if operation completed is QSOPOSTIOCOMPLETION, QSOSTARTRECV, QSOSTARTSEND, or QSOSTARTACCEPT:
Possible values if operation completed is GSKSECURESOCSTARTSEND or GSKSECURESOCSTARTRECV:
Possible values common to GSKSECURESOCSTARTSEND and GSKSECURESOCSTARTRECV:
Values unique to GSKSECURESOCSTARTRECV:
Possible values if operationCompleted is GSKSECURESOCSTARTINIT:
|
Possible values are:
If operationCompleted is QSOPOSTIOCOMPLETION:
[EAGAIN] | The specified timer value expired. |
[ECLOSED] | The socket descriptor was closed before the timer expired. |
If operationCompleted is QSOSTARTRECV or GSKSECURESOCSTARTRECV:
[EAGAIN] | The operation did not complete in the specified
time. |
[EIO] | Input/output error. |
[ECONNABORTED] | Connection ended abnormally.
This error code indicates that the transport provider ended the connection abnormally because of one of the following:
|
[ECONNRESET] | A connection with a remote socket was reset by
that socket. |
[ECLOSED] | Connection was closed. Only valid for
QSOSTARTRECV. |
[EFAULT] | Read buffer pointer not valid. |
If operationCompleted is QSOSTARTSEND or GSKSECURESOCSTARTSEND:
[EAGAIN] | The operation did not complete in the specified
time. |
[EIO] | Input/output error. |
[EPIPE] | Broken pipe. |
[ECLOSED] | Connection was closed. Only valid for
QSOSTARTSEND |
[EFAULT] | Send buffer pointer not valid. |
If operationCompleted is QSOSTARTACCEPT:
[EAGAIN] | The operation did not complete in the specified
time. |
[ECONNABORTED] | Connection ended abnormally. |
[ECLOSED] | Listening socket closed. |
[EIO] | Input/output error. |
[EMFILE] | Too many descriptors for this process. |
[ENFILE] | Too many descriptors in system. |
[ENOBUFS] | There is not enough buffer space for the
requested operation. |
[EUNKNOWN] | Unknown system state. |
If operationCompleted is GSKSECURESOCSTARTINIT:
[ECONNABORTED] | Connection ended abnormally. |
[EDEADLK] | Resource deadlock avoided. |
[EINTR] | Interrupted function call. |
[EIO] | Input/output error. |
[ETERM] | Operation terminated. |
[EUNATCH] | The protocol required to support the specified address family is not available at this time. |
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.
secureDataTransferSize | (Output) Number of bytes received or sent if
operationCompleted is GSKSECURESOCSTARTRECV or GSKSECURESOCSTARTSEND
respectively and returnValue equals GSK_OK. |
bytesAvailable | (Output) Number of bytes available to be read
from connection. This parameter is valid only if operationCompleted is
QSOSTARTACCEPT and returnValue is >= 0. |
operationWaitTime | (Ouput) The value of the operationWaitTime when
the operation was started. |
postedDescriptor | (Ouput) Always set to negative one. This field is
only used on input for QsoPostIOCompletion(). When the operation is retrieved
with QsoWaitForIOCompletion(), the descriptorHandle should be used to
identify the socket connection and not this field. |
operationCompleted | (Output) The operation that was started and has
now completed.
|
If this parameter is null, QsoWaitForIOCompletion() waits indefinitely. If this value is specified, and 0 seconds 0 microseconds are specified, QsoWaitForIOCompletion() returns immediately.
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.
QsoWaitForIOCompletion returns an integer. Possible value are:
1 | Completion of an overlapped I/O function has been
returned. |
-1 | The QsoWaitForIOCompletion() function timed out
or an error occurred. Errno value has been set. |
0 | If the QsoWaitForIOCompletion() function is issued with a timeToWait parameter that specifies 0 seconds 0 microseconds and there is no completion status to report, the function returns immediately with a return value of zero. |
When QsoWaitForIOCompletion fails, errno can be set to one of the following:
[ETIME] | The function has blocked for the time period
specified and has no completion status to report. |
[EFAULT] | Bad address. The system detected a bad address
while attempting to access the completionStatus or the timeToWait
parameter. |
[EDESTROYED] | The I/O completion port has been destroyed. |
[EINVAL] | The value of the I/O completion port is not valid
or the timeToWait parameter is not valid. |
[EINTR] | Interrupted function call. |
[EUNKNOWN] | Unknown system state. |
Message ID | Error Message Text |
---|---|
CPFA081 E | Unable to set return value or error code. |
CPE3418 E | Possible APAR condition or hardware failure. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | UNIX-Type APIs | APIs by category |