#include <dwc.h>BOOL DWC_SendUnreliable(u8 aid,
const void *buffer,
int size);| aid | AID of the send destination. |
| buffer | Pointer to the send buffer. |
| size | Size of the send buffer. |
| TRUE | Storing the data in the send buffer succeeded. |
| FALSE | Storing the data in the send buffer failed. Either an error has occurred, an invalid AID has been specified, or there was an attempt to send more than the maximum data size. |
After matchmaking completes, this function performs an Unreliable send using 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 be returned 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.
The maximum data size that can be sent at one time is determined In the DWC library (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 communication devices, avoid setting the size greater than 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, the send completion does not guarantee delivery to the other host. It only means that data was completely passed to a low-layer send function.
You can get the AIDs of the connected hosts using the DWC_GetAIDList function.
By using the DWC_SendUnreliableBitmap function, an Unreliable send can be done to multiple AIDs at one time.
CONFIDENTIAL