📄 t_close.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>t_close</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4>NAME</h4><blockquote>t_close - close a transport endpoint</blockquote><h4>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="xti.h.html">xti.h</a>>int t_close( int fd)</code></pre></blockquote><h4>DESCRIPTION</h4><blockquote><pre><P><table bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Parameters</b><th align=center><b>Before call</b><th align=center><b>After call</b><tr valign=top><td align=left>fd<td align=center>x<td align=center>/</table></pre><p>The<i>t_close()</i>function informs the transport provider that the user is finishedwith the transport endpoint specified by<I>fd</I>,and frees any local library resources associated with the endpoint.In addition,<i>t_close()</i>closes the file associated with the transport endpoint.<p>The function<i>t_close()</i>should be called from theT_UNBNDstate (see<i><a href="t_getstate.html">t_getstate()</a></i>).However, this function does not check state information,so it may be called from any state to close a transport endpoint.If this occurs, the local library resources associated with the endpointwill be freed automatically. In addition,<i><a href="close.html">close()</a></i>will be issued for that file descriptor; if there are no otherdescriptors in this process or in another process which referencesthe communication endpoint, any connection that may be associatedwith that endpoint is broken. The connection may be terminatedin an orderly or abortive manner.<p>A<i>t_close()</i>issued on a connection endpoint may cause data previously sent,or data not yet received, to be lost.It is the responsibility of the transport user to ensure that data is receivedby the remote peer.<p>For advice on how to write protocol-independent applications, see<xref href=writpisw></xref>.For information on protocol-specific behaviour of<i>t_close()</i>,see the XTI Appendix for the relevant transport provider.</blockquote><h4>VALID STATES</h4><blockquote>ALL - apart from T_UNINIT</blockquote><h4>ERRORS</h4><blockquote>On failure,<I>t_errno</I>is set to the following:<dl compact><dt>[TBADF]<dd>The specified file descriptor does not refer to a transport endpoint.<dt>[TPROTO]<dd>This error indicates that a communication problem has been detected betweenXTI and the transport provider for which there is no other suitable XTIerror<I>(t_errno)</I>.<dt>[TSYSERR]<dd>A system error has occurred during execution of this function.</dl></blockquote><h4>RETURN VALUE</h4><blockquote>Upon successful completion, a value of 0 is returned. Otherwise,a value of -1 is returned and<I>t_errno</I>is set to indicate an error.</blockquote><h4>SEE ALSO</h4><blockquote><i><a href="t_getstate.html">t_getstate()</a></i>,<i><a href="t_open.html">t_open()</a></i>,<i><a href="t_unbind.html">t_unbind()</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -