nn::dlp::CTR::Server::Initialize Member Functionstatic nn::Result Initialize( nn::Handle eventHandle, u8 maxClientNum, u8 childIndex, void * pBuffer, size_t bufferSize, size_t blockBufferSize = MIN_NETWORK_BLOCK_BUFFER_SIZE *2, size_t blockBufferNum = MIN_NETWORK_BLOCK_BUFFER_NUM );
| Name | Description | |
|---|---|---|
| in | eventHandle | Specifies a handle to the nn::os::Event object waiting for a signal from Download Play. Initialize the event in the application. Use the GetEventDesc function to get the event information. |
| in | maxClientNum | Specifies the maximum number of clients (from 1 to MAX_CLIENT_NUM) that can connect to the server. |
| in | childIndex | Specify the index (the RSF ChildIndex) of the child program to distribute. You can specify a value between 0 and 255. (A server can have up to 256 children.) |
| in | pBuffer | Pointer to the DLP working buffer. Must be 4096-byte aligned. |
| in | bufferSize | Size of working buffer. Must be 4096-byte aligned. |
| in | blockBufferSize | This is the size of the block buffer when data that has been read from a file is kept before sending. Specify a size is greater than or equal to MIN_NETWORK_BLOCK_BUFFER_SIZE and less than or equal to MAX_NETWORK_BLOCK_BUFFER_SIZE. |
| in | blockBufferNum | This is the number of block buffers. Specify a number greater than or equal to MIN_NETWORK_BLOCK_BUFFER_NUM and less than or equal to MAX_NETWORK_BLOCK_BUFFER_NUM. |
Result values are returned as the result of the operation.| Value | Description |
|---|---|
Result::IsSuccess |
Initialization was successful. |
ResultInvalidPointer |
pBuffer is either NULL or not 4096-byte aligned. |
ResultOutOfRange |
maxClientNum, bufferSize, blockBufferSize, and blockBufferNum are invalid. |
ResultInvalidHandle |
eventHandle is invalid. |
ResultAlreadyOccupiedWirelessDevice |
The wireless device is already occupied for another purpose. Exit the other wireless process. |
ResultInternalError |
An irrecoverable error occurred internally. |
ResultWirelessOff |
Communications cannot occur in this state (sleep or the wireless switch is off). |
ResultInvalidMediaType |
The media type of the parent device is not supported. |
ResultFailedToAccessMedia |
Cannot access the media. The child program may not be properly installed on the parent or a card may have been removed. |
ResultChildTooLarge |
The child program exceeds the standard import size (MAX_CHILD_IMPORT_SIZE). |
ResultInvalidRegion |
The child program and the system have different regions. |
Initializes the server.
For the pBuffer argument, specify a 4096-byte aligned buffer of the size specified by the GetBufferSize function. Do not use device memory for the buffer. The maximum import size for a child program that can be distributed is 32 MB.
The import size can be checked using the RequiredSize item that is displayed when you select a child device on the DevMenu's Import tab.
This function might block for a long time. This can happen because communications in the background have been completed and the DLP library has taken control of the communications device.
This control of the communications device will continue until the Finalize function is called.
CONFIDENTIAL