nn::rdt::CTR::Receiver Classclass Receiver
Class that represents a device that receives data.
The process below shows how to use the Receiver class. Although the description below leaves out calls to Process, in practice Process must be called periodically (at least every game frame).
1. Create an instance of the Receiver class.
2. Call Initialize to initialize the instance. (This assigns memory that the Receiver instance will use as working memory and receive buffer.)
3. Call Wait to wait for a Sender instance to connect.
4. Once the state transitions to RECEIVER_STATE_OPENED, call Receive periodically. As data arrives, write it to a region that has been prepared by the application.
5. Once the state transitions to RECEIVER_STATE_FINISHED, confirm that the data size readable by Receive is now zero. Then call Close.
6. Once the state transitions to RECEIVER_STATE_CLOSED, call Finalize to finalize the Receiver class.
| S |
RECEIVER_WORKBUF_SIZE
|
Size of the working memory required by the Receiver instance. |
|---|
Receiver
|
Constructor. | |
|---|---|---|
~Receiver
|
Destructor. | |
Initialize
|
Initializes an instance. | |
Finalize
|
Frees resources that were used by a Receiver instance, including the receive buffer and the endpoint descriptor(s). |
|
Wait
|
Issues a request to wait for a connection. | |
Close
|
Issues a request to revert an instance to the CLOSED state. |
|
Receive
|
Reads the data that has accumulated in the receive buffer. | |
Process
|
Proceeds with communication. The actual communication takes place within this function. | |
Cancel
|
Cancels processing. | |
GetStatus
|
Gets the status of a Receiver instance. |
|
SetPacketLossRatio
|
Virtually sets the packet loss ratio (for debugging). This function may be removed in a future release without notice. | |
PrintDebugInfo
|
Prints detailed information about the internal state of a Receiver instance (for debugging). This function may be removed in a future release without notice. |
CONFIDENTIAL