1#ifndef POSER_CORE_CLIENT_H
2#define POSER_CORE_CLIENT_H
44 ATTR_RETNONNULL ATTR_NONNULL((1));
67 const char *certfile,
const char *keyfile)
127 ATTR_RETNONNULL ATTR_NONNULL((1));
178 ATTR_NONNULL((1)) ATTR_NONNULL((3));
PSC_Connection * PSC_Connection_createTcpClient(const PSC_TcpClientOpts *opts)
Create a connection as a TCP client.
int PSC_Connection_createTcpClientAsync(const PSC_TcpClientOpts *opts, void *receiver, PSC_ClientCreatedHandler callback)
Create a connection as a TCP client asynchronously.
Options for creating a TCP client.
void PSC_TcpClientOpts_setBlacklistHits(PSC_TcpClientOpts *self, int blacklistHits)
Enable blacklisting of failed remote addresses.
void PSC_TcpClientOpts_setProto(PSC_TcpClientOpts *self, PSC_Proto proto)
Set a specific protocol (IPv4 or IPv6).
void PSC_TcpClientOpts_numericHosts(PSC_TcpClientOpts *self)
Only use numeric hosts, don't attempt to resolve addresses.
void PSC_TcpClientOpts_destroy(PSC_TcpClientOpts *self)
PSC_TcpClientOpts destructor.
void PSC_TcpClientOpts_disableCertVerify(PSC_TcpClientOpts *self)
Disable server certificate verification.
void PSC_TcpClientOpts_readBufSize(PSC_TcpClientOpts *self, size_t sz)
Set read buffer size.
PSC_TcpClientOpts * PSC_TcpClientOpts_create(const char *remotehost, int port)
PSC_TcpClientOpts constructor.
void PSC_TcpClientOpts_enableTls(PSC_TcpClientOpts *self, const char *certfile, const char *keyfile)
Enable TLS for the connection.
Options for creating a UNIX socket client.
void PSC_UnixClientOpts_destroy(PSC_UnixClientOpts *self)
PSC_UnixClientOpts destructor.
void PSC_UnixClientOpts_readBufSize(PSC_UnixClientOpts *self, size_t sz)
Set read buffer size.
PSC_UnixClientOpts * PSC_UnixClientOpts_create(const char *sockname)
PSC_UnixClientOpts constructor.
void(* PSC_ClientCreatedHandler)(void *receiver, PSC_Connection *connection)
Handler for completed async client creation.
Definition: client.h:32
declaration of the PSC_Proto enum
PSC_Proto
Protocol to use for TCP connections.
Definition: proto.h:10