SOC:u added close/shutdown sockets
This commit is contained in:
parent
ac7af47956
commit
464d6c6363
@ -27,3 +27,6 @@ Result socExit(void);
|
||||
*/
|
||||
long gethostid(void);
|
||||
|
||||
int SOCU_ShutdownSockets();
|
||||
|
||||
int SOCU_CloseSockets();
|
||||
|
15
libctru/source/services/soc/soc_closesockets.c
Normal file
15
libctru/source/services/soc/soc_closesockets.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "soc_common.h"
|
||||
#include <3ds/ipc.h>
|
||||
#include <3ds/result.h>
|
||||
|
||||
int SOCU_CloseSockets()
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0x21,0,2); // 0x210002;
|
||||
cmdbuf[1] = IPC_Desc_CurProcessHandle();
|
||||
|
||||
int ret = svcSendSyncRequest(SOCU_handle);
|
||||
if(R_FAILED(ret))return ret;
|
||||
return cmdbuf[1];
|
||||
}
|
14
libctru/source/services/soc/soc_shutdownsockets.c
Normal file
14
libctru/source/services/soc/soc_shutdownsockets.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include "soc_common.h"
|
||||
#include <3ds/ipc.h>
|
||||
#include <3ds/result.h>
|
||||
|
||||
int SOCU_ShutdownSockets()
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0x19,0,0); // 0x190000
|
||||
|
||||
int ret = svcSendSyncRequest(SOCU_handle);
|
||||
if(R_FAILED(ret))return ret;
|
||||
return cmdbuf[1];
|
||||
}
|
Loading…
Reference in New Issue
Block a user