DWC_SendReliableBitmap

Syntax

#include <dwc.h>

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

Arguments

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

Return Values

This function returns an AID bitmap, with bits set for each host to which preparations to send were successful.
If this host's own AID bit was set when the bitmap was passed to the 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.

Description

After matchmaking completes, this function performs a reliable transfer to the partners whose AIDs are specified in bitmap.

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.

When data is sent using this function, it is temporarily saved as described below. Do not change the content of the send data (buffer) during this time. To determine whether send data can be changed, use either the DWC_IsSendableReliable 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.

The data sent using this function will be stored in a send buffer of the size specified by the DWC_InitFriendsMatch 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 DWC_ProcessFriendsMatch function as soon as free space become available.

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 DWC_ProcessFriendsMatch function. The maximum data size can be changed using the DWC_SetSendSplitMax 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.

In addition, when there is a send completion callback configured with the DWC_SetUserSendCallback 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.

To get the AID list of the connected communication partners, use the DWC_GetAIDList function.

To make a reliable transfer to a specific communication partner, use the DWC_SendReliable function.

Revision History

1.4.20
Added a precaution about the timing of send buffer rewrites.

CONFIDENTIAL