#include <dwc.h>
BOOL DWC_SendUnreliable( u8 aid, const void* buffer, int size );
After matchmaking completes, this function performs an Unreliable send via UDP to the AID specified in aid.
An Unreliable send is a UDP communication, so sent packets may be lost, or the send order may be switched. No error will return, even if the sent data does not arrive. However, this method is fast because there is no confirmation when the data arrives and there are no data resends.
In the DWC library, the maximum data size that can be sent at one time is determined (the default is 1465 bytes). If data larger than this is sent via an Unreliable send, the send fails and FALSE is returned. The maximum data size can be changed with the DWC_SetSendSplitMax
function. To maintain compatibility with differently configured communications devices, try not to set the size above the default.
If the DWC_SetUserSendCallback function is used to configure the send completion callback and the send is successful, the callback is called before exiting this function. However, "send completion" does not guarantee delivery occurred. It only means that data has been passed to the low layer send function.
You can get the AID of the connected DS devices using the DWC_GetAIDList
function.
By using the DWC_SendUnreliableBitmap function, an Unreliable sending can be made to multiple AIDs at one time.
aid |
AID of the send destination. |
buffer |
Pointer to the send buffer. |
size |
Size of the send buffer. |
TRUE |
The data set is completed for the send buffer. |
FALSE |
The data set failed for the send buffer. Either an error has occurred, an invalid AID has been specified, or there was an attempt to send more than the maximum data size. |
DWC_SendUnreliableBitmap, DWC_SendReliable, DWC_SendReliableBitmap, DWC_SetSendSplitMax, DWC_SetUserSendCallback, DWC_GetAIDList
2006/02/2002 Added greater detail to the description of the return values
12/16/2005 Added a detailed function description
07/22/2005 Initial version