10 #include "../sf/service.h"
12 #define HTCS_PEER_NAME_MAX 32
13 #define HTCS_PORT_NAME_MAX 32
15 #define HTCS_SESSION_COUNT_MAX 0x10
16 #define HTCS_SOCKET_COUNT_MAX 40
17 #define HTCS_FD_SET_SIZE HTCS_SOCKET_COUNT_MAX
19 typedef uint16_t HtcsAddressFamilyType;
22 char name[HTCS_PEER_NAME_MAX];
26 char name[HTCS_PORT_NAME_MAX];
30 HtcsAddressFamilyType family;
41 int fds[HTCS_FD_SET_SIZE];
48 HTCS_EADDRNOTAVAIL = 4,
53 HTCS_ECONNABORTED = 13,
54 HTCS_ECONNREFUSED = 14,
56 HTCS_EDESTADDRREQ = 17,
58 HTCS_EINPROGRESS = 26,
73 HTCS_EWOULDBLOCK = HTCS_EAGAIN,
120 Result htcsCreateSocket(
s32 *out_err,
HtcsSocket *out,
bool enable_disconnection_emulation);
121 Result htcsStartSelect(
u32 *out_task_id,
Handle *out_event_handle,
const s32 *read,
size_t num_read,
const s32 *write,
size_t num_write,
const s32 *except,
size_t num_except,
s64 tv_sec,
s64 tv_usec);
122 Result htcsEndSelect(
s32 *out_err,
s32 *out_count,
s32 *read,
size_t num_read,
s32 *write,
size_t num_write,
s32 *except,
size_t num_except,
u32 task_id);
138 Result htcsSocketSendStart(
HtcsSocket *s,
u32 *out_task_id,
Handle *out_event_handle,
const void *buffer,
size_t buffer_size,
s32 flags);
142 Result htcsSocketContinueSend(
HtcsSocket *s,
s64 *out_size,
bool *out_wait,
const void *buffer,
size_t buffer_size,
u32 task_id);
Service * htcsGetMonitorServiceSession(void)
Gets the Service object for the actual HTCS monitor service session.
void htcsExit(void)
Exit the HTCS service.
Result htcsGetPeerNameAny(HtcsPeerName *out)
Manager functionality.
Result htcsInitialize(u32 num_sessions)
Initialize the HTCS service.
Service * htcsGetManagerServiceSession(void)
Gets the Service object for the actual HTCS manager service session.
Result htcsSocketClose(HtcsSocket *s, s32 *out_err, s32 *out_res)
Socket functionality.
Service object structure.
Definition: service.h:14
int64_t s64
64-bit signed integer.
Definition: types.h:28
u32 Handle
Kernel object handle.
Definition: types.h:43
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21