📄 t_rcvreldata.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>t_rcvreldata</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_rcvreldata - receive an orderly release indication orconfirmation containing user data<xref type="10" name="rcvreldata"></xref></blockquote><h4>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="xti.h.html">xti.h</a>>int t_rcvreldata( int fd, struct t_discon *discon)</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>/<tr valign=top><td align=left>discon-><td align=center>udata.maxlen<td align=center>x<tr valign=top><td align=left>discon-><td align=center>udata.len<td align=center>/<tr valign=top><td align=left>discon-><td align=center>udata.buf<td align=center>?<tr valign=top><td align=left>discon-><td align=center>reason<td align=center>/<tr valign=top><td align=left>discon-><td align=center>sequence<td align=center>/</table></pre><p>This function is used to receive an orderly release indication forthe incoming direction of data transfer and to retrieve anyuser data sent with the release.The argument <I>fd</I>identifies the local transport endpointwhere the connection exists, and <I>discon</I>points to a<B>t_discon</B>structure containing the following members:<pre><code>struct netbuf udata;int reason;int sequence;</code></pre><p>After receipt of this indication, the user may notattempt to receive more data via <i><a href="t_rcv.html">t_rcv()</a></i>or <i><a href="t_rcvv.html">t_rcvv()</a></i>.Such an attempt will fail with <I>t_error</I>set to [TOUTSTATE].However, the user may continue tosend data over the connection if <i><a href="t_sndrel.html">t_sndrel()</a></i>or<i><a href="t_sndreldata.html">t_sndreldata()</a></i>has not been called by the user.<p>The field <I>reason</I>specifies the reason for thedisconnection through a protocol-dependent <I>reason code</I>,and <I>udata</I>identifies any user data that was sent with thedisconnection; the field <I>sequence</I>is not used.<p>If a user does not care if there is incoming data anddoes not need to know the value of <I>reason</I>,<I>discon</I>may be a null pointer, and any user data associated withthe disconnection will be discarded.<p>If <I>discon->udata.maxlen</I>is greater than zero and less thanthe length of the value, <i>t_rcvreldata()</i>fails with <I>t_errno</I>set to [TBUFOVFLW].<p>This function is an optional service of the transportprovider, only supported by providers of service typeT_COTS_ORD. The flag T_ORDRELDATA in the <I>info->flag</I>field returned by <i><a href="t_open.html">t_open()</a></i>or <i><a href="t_getinfo.html">t_getinfo()</a></i>indicates thatthe provider supports orderly release user data;when the flag is not set, this function behaves as<i><a href="t_rcvrel.html">t_rcvrel()</a></i>and no user data is returned.<p>This function may not be available on all systems.</blockquote><h4>VALID STATES</h4><blockquote>T_DATAXFER, T_OUTREL</blockquote><h4>ERRORS</h4><blockquote>On failure, <I>t_errno</I>is set to one of the following:<dl compact><dt>[TBADF]<dd>The specified file descriptor does not refer to a transport endpoint.<dt>[TBUFOVFLW]<dd>The number of bytes allocated forincoming data (maxlen) is greater than0 but not sufficient to store the data,and the disconnection information to bereturned in <I>discon</I>will be discarded.The provider state, as seen by theuser, will be changed as if the datawas successfully retrieved.<dt>[TLOOK]<dd>An asynchronous event has occurred on thistransport endpoint and requires immediateattention.<dt>[TNOREL]<dd>No orderly release indication currentlyexists on the specified transport endpoint.<dt>[TNOTSUPPORT]<dd>Orderly release is not supported by theunderlying transport provider.<dt>[TOUTSTATE]<dd>The communications endpoint referenced by<I>fd</I>is not in one of the states in which a call to this function is valid.<dt>[TPROTO]<dd>This error indicates that a communicationproblem has been detected between XTI andthe transport provider for which there isno other suitable XTI error<I>(t_errno)</I>.<dt>[TSYSERR]<dd>A system error has occurred during executionof 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_getinfo.html">t_getinfo()</a></i>,<i><a href="t_open.html">t_open()</a></i>,<i><a href="t_sndreldata.html">t_sndreldata()</a></i>,<i><a href="t_rcvrel.html">t_rcvrel()</a></i>,<i><a href="t_sndrel.html">t_sndrel()</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 + -