1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 8<title>DWC_SendReliable</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__transport_8h_18af931f880aadbc50700c6c212ec64cc"></a> 14<h1 align="left">DWC_SendReliable</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE>BOOL <a href=DWC_SendReliable.html#dwc__transport_8h_18af931f880aadbc50700c6c212ec64cc>DWC_SendReliable</a>(u8 aid, 22 const void *buffer, 23 int size);</CODE></PRE></dd> 24</dl> 25 26<h2>Arguments</h2> 27 28<TABLE border="1" width="100%"> 29 <TBODY> 30 31 <TR> 32<TD width="13%"><EM><STRONG>aid</STRONG></EM></TD> 33<TD width="87%">AID of the send destination.</TD> 34 </TR> 35 36 <TR> 37<TD width="13%"><EM><STRONG>buffer</STRONG></EM></TD> 38<TD width="87%">Pointer to the send buffer.</TD> 39 </TR> 40 41 <TR> 42<TD width="13%"><EM><STRONG>size</STRONG></EM></TD> 43<TD width="87%">Size of the send buffer.</TD> 44 </TR> 45 46 </TBODY> 47</TABLE> 48 49<h2>Return Values</h2> 50 51<TABLE border="1" width="100%"> 52 <TBODY> 53 54 <TR> 55<TD width="13%"><EM><STRONG>TRUE</STRONG></EM></TD> 56<TD width="87%">Storing the data in the send buffer succeeded.</TD> 57 </TR> 58 59 <TR> 60<TD width="13%"><EM><STRONG>FALSE</STRONG></EM></TD> 61<TD width="87%">Storing the data in the send buffer failed.<br>Either an error has occurred, the previous send process has not ended, an invalid AID was specified, or there is not enough space in the send buffer.</TD> 62 </TR> 63 64 </TBODY> 65</TABLE> 66 67<H2>Description</H2> 68<p>After matchmaking completes, performs a reliable transfer to the partner specified by <CODE>aid</CODE>.</p><p>Reliable transfers use UDP, but implementation at the library level ensures that data is received by the other party in the order it was sent, without duplicating or dropping packets. However, because packet arrival is confirmed for each transfer, this takes more time than unreliable transfers, which do not confirm packet arrival.</p><p>When data is sent using this function, it is temporarily saved as described below. Do not change the content of the send data (<CODE>buffer</CODE>) during this time. To determine if send data can be changed, use either the <a href=DWC_IsSendableReliable.html#dwc__transport_8h_11578b36e82bdba244e07565cb7ac7b20><CODE>DWC_IsSendableReliable</CODE></a> function to check whether reliable transfer is possible in the current state, or the send completion callback mentioned below to check whether the transfer has completed.</p><p>The data sent using this function will be stored in a send buffer of the size specified by the <a href=DWC_InitFriendsMatch.html#dwc__main_8h_186c2f56943c3a20c05d73d4a2abad609><CODE>DWC_InitFriendsMatch</CODE></a> function until it is confirmed that the data has been received. If there is not enough free space in this buffer, the data that did not fit will be stored temporarily and sent consecutively within the <a href=DWC_ProcessFriendsMatch.html#dwc__main_8h_1c7b64bfd61e6c336a1d382fb6d1ea2d8><CODE>DWC_ProcessFriendsMatch</CODE></a> function as soon as free space become available. This function returns <CODE>FALSE</CODE> if there is no free space at all in this buffer.</p><p>A single packet up to a fixed maximum size (1,465 bytes by default) can be sent. Data of larger size will be split up internally when it is sent. The data that is left after being split will be saved temporarily before it is sent consecutively in the <a href=DWC_ProcessFriendsMatch.html#dwc__main_8h_1c7b64bfd61e6c336a1d382fb6d1ea2d8><CODE>DWC_ProcessFriendsMatch</CODE></a> function.</p><p>The maximum data size can be changed using the <a href=DWC_SetSendSplitMax.html#dwc__transport_8h_125d7a93f442305b24c4ccf9c7cdd1251><CODE>DWC_SetSendSplitMax</CODE></a> function. However, to maintain compatibility with communication devices of various configurations, the data size should not be set to a value larger than the default.</p><p>In addition, when there is a send completion callback configured with the <A href="DWC_SetUserSendCallback.html"><CODE>DWC_SetUserSendCallback</CODE></a> function, the callback is called when the sending of data has finished. However, in this case, saying that transmission is complete means that data has been stored in the send buffer, not that it has been received by the communication partner.</p><p>To get the AID list of the connected communication partner, use the <a href=DWC_GetAIDList.html#dwc__main_8h_1989c8c4ab809e9545639f4b84896be65><CODE>DWC_GetAIDList</CODE></a> function.</p> 69 70<H2>Revision History</H2> 71<DL> 72 73<DT><para>1.4.20</DT> 74<DD>Added a precaution about the timing of send buffer rewrites.</DD> 75 76</DL> 77<hr><p>CONFIDENTIAL</p></body> 78</html> 79