DWC_SendReliableBitmap

C Specification

#include <dwc.h>

u32 DWC_SendReliableBitmap( u32 bitmap,
                            const void* buffer,
                            int size );

Description

After matchmaking completes, this function performs Reliable send via UDP to multiple AIDs using the AID bitmap specified in bitmap.

With Reliable send, data is delivered to the communications partner in the order it was sent, with no duplication or packet loss. However, it will take longer for the send to complete, since each packet is checked when it arrives.

If data sending is impeded on a layer lower than the DWC, the data is stored in the send buffer with the size specified by the DWC_InitFriendsMatch function. If there is not enough space in the send buffer and a Reliable sending is attempted, the data that could not be sent is stored as is and is sent from the DWC_ProcessFriendsMatch function as soon as space opens up in the send buffer.

Also, 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, the send data is divided up, and the send is suspended. 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.

While the send data is suspended in this manner, do not delete the send buffer. Also, no further data can be sent during the suspension.

It is possible to check whether or not a Reliable send is possible, including whether there is empty send buffer space and if the send destination AID is valid, by using the DWC_IsSendableReliable function.

When the send completion callback is configured with the DWC_SetUserSendCallback function, the callback is called when the data send is complete. However, the send completion being referred to here is only for when data has been passed to a low-layer send function and does not mean when the data arrives at the communication partner.

The AID bitmap of a connected DS can be obtained with the DWC_GetAIDBitmap function.

By using the DWC_SendReliable function, a Reliable send can be made with multiple values assigned to an AID.

Arguments

bitmap Bitmap in which the AID bits for send destination have been set.
buffer Pointer to the send buffer.
size Size of the send buffer.

Return Values

Bitmap in which the AID bits are set for successful transmission preparations. If the device's own AID bit is set and passed to an argument, the bit remains set.
There is a failure when an error occurs, the previous send process does not end, an invalid AID is specified, or there is not enough space in the send buffer.

See Also

DWC_SendReliable, DWC_SendUnreliable, DWC_SendUnreliableBitmap, DWC_InitFriendsMatch, DWC_ProcessFriendsMatch, DWC_SetSendSplitMax, DWC_IsSendableReliable, DWC_SetUserSendCallback, DWC_GetAIDBitmap

Revision History

05/22/2006 Corrected the explanation regarding errors
02/22/2006 Corrected the function description
12/16/2005 Added a detailed description of the function
11/14/2005 Added text about Reliable transmissions
11/02/2005 Initial version