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.h
Go to the documentation of this file.
40
41#pragma once
42
43#include <stdint.h>
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49// Pack network protocol structures tightly for wire format
50#ifdef _WIN32
51#pragma pack(push, 1)
52#endif
53
95#define TURN_URL_BUFFER_SIZE 64
96#define TURN_USERNAME_BUFFER_SIZE 32
97#define TURN_CREDENTIAL_BUFFER_SIZE 64
98
99typedef struct __attribute__((packed)) {
100 uint8_t url_len;
101 char url[TURN_URL_BUFFER_SIZE];
102 uint8_t username_len;
103 char username[TURN_USERNAME_BUFFER_SIZE];
104 uint8_t credential_len;
105 char credential[TURN_CREDENTIAL_BUFFER_SIZE];
107
113
115#define TURN_DEFAULT_PORT 3478
116
118#define TURN_TLS_DEFAULT_PORT 5349
119
121#define TURN_CREDENTIAL_EXPIRY_SECS (24 * 60 * 60) // 24 hours
122
124
125#ifdef _WIN32
126#pragma pack(pop)
127#endif
128
129#ifdef __cplusplus
130}
131#endif
132 /* turn */
unsigned char uint8_t
Definition common.h:60
#define TURN_CREDENTIAL_BUFFER_SIZE
Definition turn.h:97
#define TURN_URL_BUFFER_SIZE
TURN server configuration with credentials.
Definition turn.h:95
turn_server_t
Definition turn.h:106
#define TURN_USERNAME_BUFFER_SIZE
Definition turn.h:96
Network quality metrics for a single participant.
Definition metrics.h:36