ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
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/* Storage capacities in elements; text buffers include the terminating NUL. */
20#define NETWORK_WEBRTC_TURN_CREDENTIALS_USERNAME_BUFFER_SIZE 128
21#define NETWORK_WEBRTC_TURN_CREDENTIALS_PASSWORD_BUFFER_SIZE 128
22
24
25#include <stdbool.h>
26#include <stdint.h>
27#include <time.h>
28
39
69asciichat_error_t turn_generate_credentials(const char *session_id, const char *secret, uint32_t validity_seconds,
70 turn_credentials_t *out_credentials);
71
78bool turn_credentials_expired(const turn_credentials_t *credentials);
79
80#endif // ASCIICHAT_NETWORKING_WEBRTC_TURN_CREDENTIALS_H
Error and exit codes - unified status values (0-255).
unsigned int uint32_t
Definition common.h:62
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
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.