ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/destroyiocompletionport.htm

196 lines
4.9 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2005 by IBM Corporation">
<title>QsoDestroyIOCompletionPort()--Destroy I/O Completion Port</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Created for V5R1 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- Edited by Kersten Feb 02 -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!--Java sync-link-->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>QsoDestroyIOCompletionPort()--Destroy I/O Completion Port</h2>
<div class="box" style="width: 70%;">
<br>
&nbsp;&nbsp;Syntax
<pre>
#include &lt;qsoasync.h&gt;
int QsoDestroyIOCompletionPort
(int IOCompletionPort)
</pre>
<br>
&nbsp;&nbsp;Service Program Name: QSOSRV3<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The QsoDestroyIOCompletionPort is used to destroy an I/O completion
port.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>int IOCompletionPort</strong> (Input)<br>
<br>
</dt>
<dd>The I/O completion port to be destroyed. All threads sleeping with
<em>QsoWaitForIOCompletion()</em> on the I/O completion port being destroyed
will be awakened with return value of -1 and errno value of EDESTROYED.<br>
<br>
</dd>
</dl>
<br>
<h3>Authorities</h3>
<p>No authorization is required.</p>
<br>
<h3>Return Values</h3>
<p>QsoDestroyIOCompletionPort() returns an integer. Possible values are:</p>
<ul>
<li>0 - Successful destruction of the I/O completion port.</li>
<li>-1 - The function has failed. Inspect the errno value to determine the
cause of the failure.</li>
</ul>
<br>
<h3>Errno Conditions</h3>
<p>When QsoDestroyIOCompletionPort fails, errno can be set to one of the
following:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top">[EINVAL]</td>
<td align="left" valign="top">The specified I/O completion port is not
valid.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">[EUNKOWN]</td>
<td align="left" valign="top">Unknown system state.</td>
</tr>
</table>
<br>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPE3418 E</td>
<td width="85%" valign="top">Possible APAR condition or hardware failure.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA081 E</td>
<td align="left" valign="top">Unable to set return value or error code.</td>
</tr>
</table>
<br>
<br>
<h3>Usage Notes</h3>
<ol>
<li>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
<em>QsoDestroyIOCompletionPort()</em>returns successfully.</li>
<li>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 <em>QsoStartRecv()</em> or
<em>QsoStartSend()</em> 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.</li>
</ol>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="createiocompletionport.htm">QsoCreateIOCompletionPort()</a>--Create
I/O Completion Port<br><br></li>
<li><a href="postiocompletion.htm">QsoPostIOCompletionPort()</a>--Post Request on
I/O Completion Port<br><br></li>
<li><a href="startrecv.htm">QsoStartRecv</a>--Start Asynchronous Recv
Operation<br><br></li>
<li><a href="startsend.htm">QsoStartSend</a>--Start Asynchronous Send
Operation<br><br></li>
<li><a href="waitforiocompletion.htm">QsoWaitForIOCompletion()</a>--Wait for I/O
Completion Operation</li>
</ul>
<br>
<hr>
API introduced: V5R1
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table></center>
</body>
</html>