ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
include/ascii-chat/discovery/session.h
Go to the documentation of this file.
1
2
3/* Storage capacities in elements; text buffers include the terminating NUL. */
4
5#include <ascii-chat/common.h>
8#pragma once
9
18
20#include <stdbool.h>
21#include <stdint.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
34
43
57
120
126
127#ifdef __cplusplus
128}
129#endif
#define ACIP_ADDRESS_SIZE
Definition acds_sizes.h:11
#define ACIP_PASSWORD_HASH_SIZE
Definition acds_sizes.h:13
unsigned short uint16_t
unsigned int uint32_t
unsigned long long uint64_t
unsigned char uint8_t
#define MAX_SESSION_PARTICIPANTS
#define SESSION_ID_SIZE
⚙️ Common definitions, error codes, macros, and types shared throughout the application
struct session_entry session_entry_t
Persisted discovery-session record used to admit and route participants.
void session_entry_destroy(session_entry_t *entry)
Free a session entry and all its resources.
#define ED25519_PUBLIC_KEY_SIZE
Ed25519 public key size in bytes.
Definition sizes.h:38
#define SESSION_STRING_BUFFER_SIZE
Host migration state for collecting HOST_LOST packets.
uint8_t connection_type
How they can be reached.
uint8_t participant_id[16]
Participant proposing new host.
uint32_t rtt_to_acds_ns
Latency to ACDS in nanoseconds.
uint8_t nat_quality_tier
NAT tier for this participant.
Host migration state for collecting HOST_LOST packets.
uint8_t identity_pubkey[32]
Ed25519 public key.
uint64_t joined_at
Unix timestamp (ms).
Persisted discovery-session record used to admit and route participants.
bool expose_ip_publicly
bool has_password
Password protection flag.
uint8_t max_participants
1-128
uint8_t host_pubkey[32]
Host's Ed25519 key.
participant_t * participants[128]
(in-memory only)
char host_address[ACIP_ADDRESS_SIZE]
uint8_t initiator_id[16]
created/joined the session
uint16_t host_port
Host's port (valid if host_established).
uint8_t host_participant_id[16]
(valid if host_established)
bool host_established
char server_address[ACIP_ADDRESS_SIZE]
IPv4/IPv6 address or hostname.
bool in_migration
Currently collecting HOST_LOST packets.
char session_string[(38+1)]
"affectionate-acquaintance-acquaintance"
char password_hash[ACIP_PASSWORD_HASH_SIZE]
uint8_t session_id[16]
UUID.
uint64_t created_at
Unix timestamp (ms) - when session was created.
uint64_t migration_start_ns
uint64_t expires_at
uint8_t capabilities
bit 0: video, bit 1: audio
uint8_t session_type
acds_session_type_t: 0=DIRECT_TCP, 1=WEBRTC
uint64_t last_activity_at
uint16_t server_port
Port number for client connection.
uint8_t current_participants
Active participant count.
host_lost_candidate_t * migration_candidates[128]
during migration
uint8_t host_connection_type
acip_connection_type_t: how to reach host