36 #include <http/client/network.h>
38 #define Ssock_TIMEOUT (-11)
40 typedef ssize_t (*Ssock_EncryptFxn)(
const void * ctx, uint8_t * oct,
41 const uint8_t * ipt,
size_t len);
43 typedef ssize_t (*Ssock_SendFxn)(
const void * ctx,
int s,
const void * buf,
44 size_t len,
int flags);
46 typedef ssize_t (*Ssock_DecryptFxn)(
const void * ctx, uint8_t * opt,
47 const uint8_t * ict,
size_t len);
49 typedef ssize_t (*Ssock_RecvFxn)(
void * ctx,
int s,
void * buf,
50 size_t len,
int flags);
52 typedef void (*Ssock_DeleteFxn)(
void * ctx);
55 Ssock_EncryptFxn encrypt;
56 Ssock_DecryptFxn decrypt;
71 extern void Ssock_construct(
Ssock_Struct * ssockP,
int s);
73 extern Ssock_Handle Ssock_create(
int s);
75 extern void Ssock_delete(Ssock_Handle * ss);
79 extern int Ssock_getSocket(Ssock_Handle ss);
81 extern ssize_t Ssock_recv(Ssock_Handle ss,
void * buf,
size_t len,
int flags);
83 extern ssize_t Ssock_recvall(Ssock_Handle ssock,
void * buf,
size_t len,
86 extern ssize_t Ssock_send(Ssock_Handle ss,
const void * buf,
size_t len,