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 QsoGetIoID() 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:


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



API introduced: V6R1

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