52#ifndef UDIF_QSTPKEYS_H
53#define UDIF_QSTPKEYS_H
69#if !defined(QSTP_ROOT_H)
71QSTP_EXPORT_API
void qstp_root_key_generate(qstp_root_signature_key* kset,
const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp);
74#if !defined(QSTP_SERVER_H)
76QSTP_EXPORT_API
void qstp_server_key_generate(qstp_server_signature_key* kset,
const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp);
92 void (*receive_callback)(qstp_connection_state*,
const char*,
size_t),
void (*disconnect_callback)(qstp_connection_state*));
95#if !defined(QSTP_CLIENT_H)
108QSTP_EXPORT_API qstp_errors
qstp_client_connect_ipv4(
const qstp_root_certificate* root,
const qstp_server_certificate* cert,
const qsc_ipinfo_ipv4_address* address,
109 uint16_t port,
void (*send_func)(qstp_connection_state*),
void (*receive_callback)(qstp_connection_state*,
const char*,
size_t));
QSTP_EXPORT_API qstp_errors qstp_server_start_ipv4(qsc_socket *source, const qstp_server_signature_key *kset, void(*receive_callback)(qstp_connection_state *, const char *, size_t), void(*disconnect_callback)(qstp_connection_state *))
Start the IPv4 QSTP multi-threaded server.
QSTP_EXPORT_API qstp_errors qstp_client_connect_ipv4(const qstp_root_certificate *root, const qstp_server_certificate *cert, const qsc_ipinfo_ipv4_address *address, uint16_t port, void(*send_func)(qstp_connection_state *), void(*receive_callback)(qstp_connection_state *, const char *, size_t))
Connect to a QSTP server over IPv4.
QSTP_EXPORT_API void qstp_root_key_generate(qstp_root_signature_key *kset, const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp)
QSTP_EXPORT_API void qstp_server_key_generate(qstp_server_signature_key *kset, const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp)