ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
turn_credentials.h
Go to the documentation of this file.
1
15
16#ifndef ASCIICHAT_NETWORKING_WEBRTC_TURN_CREDENTIALS_H
17#define ASCIICHAT_NETWORKING_WEBRTC_TURN_CREDENTIALS_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/* Storage capacities in elements; text buffers include the terminating NUL. */
24#define NETWORK_WEBRTC_TURN_CREDENTIALS_USERNAME_BUFFER_SIZE 128
25#define NETWORK_WEBRTC_TURN_CREDENTIALS_PASSWORD_BUFFER_SIZE 128
26
28
29#include <stdbool.h>
30#include <stdint.h>
31#include <time.h>
32
42
72asciichat_error_t turn_generate_credentials(const char *session_id, const char *secret, uint32_t validity_seconds, turn_credentials_t *out_credentials);
73
80bool turn_credentials_expired(const turn_credentials_t *credentials);
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif // ASCIICHAT_NETWORKING_WEBRTC_TURN_CREDENTIALS_H
Error and exit codes - unified status values (0-255).
unsigned int uint32_t
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:48
uint8_t session_id[SESSION_ID_SIZE]
TURN server credentials (username + password).
⏱️ High-precision timing utilities using sokol_time.h and uthash
#define NETWORK_WEBRTC_TURN_CREDENTIALS_USERNAME_BUFFER_SIZE
#define NETWORK_WEBRTC_TURN_CREDENTIALS_PASSWORD_BUFFER_SIZE
bool turn_credentials_expired(const turn_credentials_t *credentials)
Check if TURN credentials have expired.
asciichat_error_t turn_generate_credentials(const char *session_id, const char *secret, uint32_t validity_seconds, turn_credentials_t *out_credentials)
Generate time-limited TURN credentials.