#include <qsoasync.h> int QsoPostIOCompletion (int IOCompletionPort, Qso_OverlappedIO_t * communicationsArea)
The QsoPostIOCompletion function will post an Qso_OverlappedIO_t request on a specifed I/O completion port. This allows an application to notify a completion port that some function or activity has occurred. The application defines what that function or activity is within the Qso_OverlappedIO_t request.
descriptorHandle | (Input) - The descriptor handle is application-specific
and is never used by the system. It is intended to make it easier for the
application to keep track of information regarding a given socket connection. |
buffer | (Input) - Supplied value is preserved. |
bufferLength | (Input) - Supplied value is preserved. |
postFlag | (Input) - Supplied value is preserved. |
fillBuffer | (Input) - Supplied value is preserved. |
returnValue | (Output) - This field will be set to 0 if this
operation completes successfully. |
errnoValue | (Output) - This field will be set to 0 if this
operation completes successfully. |
operationCompleted | (Output) - When the operation is posted to the
I/O completion port, this field is updated to indicate that the operation was a
QSOPOSTIOCOMPLETION. |
secureDataTransferSize | Not used. |
bytesAvailable | Not used. |
operationWaitTime | (Input) - A timeval structure which specifies a
time to wait before posting this operation asynchronously to the I/O completion
port with errnoValue set to EAGAIN.
struct timeval { long tv_sec; /* second */ long tv_usec; /* microseconds */ };If this field is set to zero, the operation will be posted immediately. If this field is non-zero, then the postedDescriptor field must be set. If postedDescriptor is closed before the timer expires, the operation will be posted to the I/O completion port with errnoValue set to ECLOSED. The minimum operationWaitTime is 1 second. The microseconds field (tv_usec) in the timeval is not used and must be set to zero. |
postedDescriptor | This field is only relevant if a non-zero timeval
was specified in operationWaitTime. This is the socket descriptor to be
associated with the timer. If this descriptor is closed before the timer expires,
the operation will be posted to the I/O completion port with errnoValue
set to ECLOSED. This field must be set when the operationWaitTime field is used. |
operationId | (Input) - An identifier to uniquely identify this
operation or a group of operations. It can be set with the return value from QsoGenerateOperationId() or with an application-defined value. This value is preserved but ignored by all APIs except QsoCancelOperation() and QsoIsOperationPending(). This field is applicable only when both postedDescriptor and operationWaitTime are specified. Otherwise the operation completes immediately and cannot be cancelled. |
reserved1 | (Input) - Must be set to hex zeroes. |
reserved2 | (Input) - Must be set to hex zeroes. |
No authorization is required.
QsoPostIOCompletion() returns an integer. Possible values are:
When QsoPostIOCompletion() fails, errno can be set to one of the following:
[EINVAL] | The I/O completion port or a reserved field was
specified that was not valid or operationWaitTime.tv_sec was negative or
operationWaitTime.tv_usec was not zero. |
[EDESTROYED] | The I/O completion port has been destroyed. |
[ENOTSOCK] | The postedDescriptor field was not set to
a socket descriptor when operationWaitTime was set. |
[ENOBUFS] | There was not enough buffer space for the
requested operation. Check the maximum allowed storage for the executing user
profile. |
[ENOMEM] | The I/O completion port is full and cannot accept any more messages at this time. |
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. |