#include <dwc.h>
BOOL DWC_SendUnreliable(u8 aid,
const void *buffer,
int size);aid |
AID for 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 simply a UDP communication, so sent packets may be lost, or the send order may be switched. No error is 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.
This function can send a size up to DWC_TRANSPORT_SEND_UNRELIABLE_MAX (1462) bytes. The function returns FALSE if a size larger than this is specified.
If the DWC_SetUserSendCallback function has been used to configure a send completion callback, and the send is successful, the callback is called before exiting this function. However, the concept of "send complete" being used here indicates only that data has been fully passed to a low-level send function, not that data has arrived at the other host.
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.
For the changelog prior to 5.1 PR2, click here.
CONFIDENTIAL