#include <revolution/nhttp/NHTTPStartup.h>
typedef void* (*NHTTPAlloc)( u32 size, int align );
typedef void (*NHTTPFree)( void* ptr );
int NHTTPStartup( NHTTPAlloc alloc, NHTTPFree free, u32 threadprio );
alloc |
Pointer to the memory block allocation function used inside the NHTTP library. |
free |
Pointer to the memory block release function used inside the NHTTP library. |
threadprio |
HTTP request thread priority (ranges from 0 to 31, with 0 being the highest priority). |
Returns zero if initialized successfully. Otherwise, returns -1.
In the event of a failure, contents of the error can be obtained with NHTTPGetError.
Initializes the NHTTP library and sets the library as available.
This function must be called once before all other NHTTP library functions. Furthermore, after using the NHTTP library, the library must be shut down by calling NHTTPCleanupAsync.
If the library is initialized successfully, a single thread for processing is started internally.
Invoke the SOStartup function and use after the socket has entered a usable state.
This does not take into consideration exclusive control between threads of user-configured memory allocation functions.
2008/12/25 Added indication that it is necessary to call the SOStartup function.
2008/02/01 Initial version.
CONFIDENTIAL