44#include "../../QSC/QSC/rcs.h"
45#include "../../QSC/QSC/socketserver.h"
65#define QSTP_SERVER_PAUSE_INTERVAL 100
#define QSTP_EXPORT_API
The api export prefix.
Definition common.h:99
#define QSTP_CERTIFICATE_ISSUER_SIZE
The maximum length of the certificate issuer string (including terminator).
Definition qstp.h:488
qstp_errors
The QSTP error values.
Definition qstp.h:875
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 multi-threaded server.
Definition server.c:402
QSTP_EXPORT_API qstp_errors qstp_server_start_ipv6(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 IPv6 multi-threaded server.
Definition server.c:451
QSTP_EXPORT_API void qstp_server_key_generate(qstp_server_signature_key *kset, const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp)
Generate a new signature key for the server.
Definition server.c:338
QSTP_EXPORT_API void qstp_server_pause(void)
Pause the server, suspending new connection joins.
Definition server.c:362
QSTP_EXPORT_API bool qstp_server_expiration_check(const qstp_server_signature_key *kset)
Check the expiration status of a server key.
Definition server.c:327
QSTP_EXPORT_API void qstp_server_quit(void)
Quit the server, closing all active connections.
Definition server.c:367
QSTP_EXPORT_API void qstp_server_resume(void)
Resume the server listener function from a paused state.
Definition server.c:397
The QSTP socket connection state structure.
Definition qstp.h:1081
The QSTP server key structure.
Definition qstp.h:1013