My Project
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
soc_closesocket.c
Go to the documentation of this file.
1
#include "
soc_common.h
"
2
#include <
sys/socket.h
>
3
4
int
closesocket
(
int
sockfd)
5
{
6
int
ret=0;
7
u32
*cmdbuf =
getThreadCommandBuffer
();
8
9
cmdbuf[0] = 0x000B0042;
10
cmdbuf[1] = (
u32
)sockfd;
11
cmdbuf[2] = 0x20;
12
13
if
((ret =
svcSendSyncRequest
(
SOCU_handle
))!=0)
return
ret;
14
15
ret = (int)cmdbuf[1];
16
if
(ret==0)ret =
_net_convert_error
(cmdbuf[2]);
17
SOCU_errno
= ret;
18
19
if
(ret!=0)
return
-1;
20
return
0;
21
}
closesocket
int closesocket(int sockfd)
Definition:
soc_closesocket.c:4
soc_common.h
getThreadCommandBuffer
u32 * getThreadCommandBuffer(void)
SOCU_errno
int SOCU_errno
Definition:
soc_common.c:5
u32
uint32_t u32
Definition:
types.h:23
_net_convert_error
s32 _net_convert_error(s32 sock_retval)
Definition:
soc_common.c:92
svcSendSyncRequest
s32 svcSendSyncRequest(Handle session)
SOCU_handle
Handle SOCU_handle
Definition:
soc_common.c:4
socket.h
source
services
soc
soc_closesocket.c
Generated on Mon Nov 24 2014 23:37:59 for My Project by
1.8.8