*/
Result HTTPC_Initialize(Handle handle, u32 sharedmem_size, Handle sharedmem_handle);
+/**
+ * @brief Finalizes HTTPC.
+ * @param handle HTTPC service handle to use.
+ */
+Result HTTPC_Finalize(Handle handle);
+
/**
* @brief Initializes a HTTP connection session.
* @param handle HTTPC service handle to use.
void httpcExit(void)
{
if (AtomicDecrement(&__httpc_refcount)) return;
+
+ HTTPC_Finalize(__httpc_servhandle);
+
svcCloseHandle(__httpc_servhandle);
if(__httpc_sharedmem_handle)
return cmdbuf[1];
}
+Result HTTPC_Finalize(Handle handle)
+{
+ u32* cmdbuf=getThreadCommandBuffer();
+
+ cmdbuf[0]=IPC_MakeHeader(0x39,0,0); // 0x390000
+
+ Result ret=0;
+ if(R_FAILED(ret=svcSendSyncRequest(handle)))return ret;
+
+ return cmdbuf[1];
+}
+
Result HTTPC_CreateContext(Handle handle, HTTPC_RequestMethod method, char* url, Handle* contextHandle)
{
u32* cmdbuf=getThreadCommandBuffer();