QsoGenerateOperationId()--Get an I/O Operation ID
Syntax
#include <qsoasync.h> unsigned long long QsoGenerateOperationId(int socketDescriptor)
Service Program Name: QSOSRV3
Default Public Authority: *USE
Threadsafe: Yes
The QsoGenerateOperationId() function is used to get an operation identifier that is unique for this socket. The operation identifier may then be used in field operationId in the Qso_OverlappedIO_t structure when an asynchronous I/O operation is started.
It is not required that an application use QsoGenerateOperationId() to set the I/O identifer. Any appropriate application-defined value may be used. Individual operations may use unique operation identifiers or groups of operations could share I/O identifiers, depending on the application's requirements. QsoGenerateOperationId(), when used consistently, is a convenient means to get unique identifiers for use on a socket. Note that operation identifiers from one sockets may not be unique if used on a different socket.
I/O identifiers are ignored by all APIs except QsoCancelOperation() and QsoIsOperationPending(). Other start operations will only preserve the input value and return it on QsoWaitForIOCompletion().
Parameters
- int socketDescriptor (Input)
- The socket descriptor where the operation identifier will be used.
Authorities
No authorization is required.
Return Values
QsoGenerateOperationId() returns an unsigned long long operation identifier. Possible values are:
- 0 - The function did not complete because an error occurred. Inspect the errno value to determine the cause of the failure.
- <>0 - Successful, the value returned is a unique operation identifier for the socket.
Errno Conditions
When QsoGenerateOperationId() fails, errno can be set to one of the following:
[EBADF] | Invalid descriptor |
[ENOTSOCK] | The specified descriptor is not a socket. |
[EUNKNOWN] | Unknown system state. |
Error Messages
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. |
Related Information
-
gsk_secure_soc_startInit()--Start Asynchronous Operation to Negotiate a Secure Session
-
gsk_secure_soc_startRecv--Start Asynchronous Receive Operation on a Secure Session
-
gsk_secure_soc_startSend--Start Asynchronous Send Operation on a Secure Session
-
QsoCancelOperation()--Cancel an I/O
Operation
-
QsoIsOperationPending()--Check if an I/O
Operation is Pending
-
QsoStartRecv--Start Asynchronous Receive Operation
-
QsoStartSend--Start Asynchronous Send Operation
- QsoWaitForIOCompletion()--Wait for I/O Completion Operation
API introduced: V6R1