QsoDestroyIOCompletionPort()--Destroy I/O Completion Port


  Syntax
 #include <qsoasync.h>

 int QsoDestroyIOCompletionPort
 (int IOCompletionPort)

  Service Program Name: QSOSRV3

  Default Public Authority: *USE

  Threadsafe: Yes

The QsoDestroyIOCompletionPort is used to destroy an I/O completion port.


Parameters

int IOCompletionPort (Input)

The I/O completion port to be destroyed. All threads sleeping with QsoWaitForIOCompletion() on the I/O completion port being destroyed will be awakened with return value of -1 and errno value of EDESTROYED.


Authorities

No authorization is required.


Return Values

QsoDestroyIOCompletionPort() returns an integer. Possible values are:


errno Conditions

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

[EINVAL] The specified I/O completion port is not valid.

[EUNKOWN] Unknown system state.


Error Messages

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.
CPFA081 E Unable to set return value or error code.


Usage Notes

  1. There can be many overlapped I/O operations outstanding when an I/O completion port is destroyed. The buffers that are associated with these overlapped I/O operations are available for use by the application as soon as QsoDestroyIOCompletionPort()returns successfully.
  2. The state of the sockets that were used to issue the overlapped I/O operations that are still outstanding is not defined. That is, there is no way for the application to determine if an outstanding QsoStartRecv() or QsoStartSend() has completed once the I/O completion port has been destroyed. For this reason, further attempts to read from those sockets will result in ECONNABORTED and further attempts to write to these sockets will result in EPIPE. No further input or output operations will be allowed on these sockets.

Related Information



API introduced: V5R1

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