ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
session_entry Struct Reference

Session entry data structure. More...

#include <include/ascii-chat/discovery/session.h>

Data Fields

char session_string [(38+1)]
 e.g., "affectionate-acquaintance-acquaintance"
 
uint8_t session_id [16]
 UUID.
 
uint8_t host_pubkey [32]
 Host's Ed25519 key.
 
uint8_t capabilities
 bit 0: video, bit 1: audio
 
uint8_t max_participants
 1-8
 
uint8_t current_participants
 Active participant count.
 
char password_hash [128]
 Argon2id hash (if has_password)
 
bool has_password
 Password protection flag.
 
bool expose_ip_publicly
 Allow IP disclosure without verification (explicit opt-in via –acds-expose-ip)
 
uint8_t session_type
 acds_session_type_t: 0=DIRECT_TCP, 1=WEBRTC
 
uint64_t created_at
 Unix timestamp (ms) - when session was created.
 
uint64_t expires_at
 Unix timestamp (ms) - absolute max lifetime (created_at + 24h)
 
uint64_t last_activity_at
 Unix timestamp (ms) - updated on join/leave/host updates (cleanup uses this)
 
char server_address [64]
 IPv4/IPv6 address or hostname.
 
uint16_t server_port
 Port number for client connection.
 
uint8_t initiator_id [16]
 First participant who created/joined the session.
 
bool host_established
 Whether a host has been designated (false = still negotiating)
 
uint8_t host_participant_id [16]
 Current host's participant_id (valid if host_established)
 
char host_address [64]
 Host's reachable address (valid if host_established)
 
uint16_t host_port
 Host's port (valid if host_established)
 
uint8_t host_connection_type
 acip_connection_type_t: how to reach host
 
bool in_migration
 Currently collecting HOST_LOST packets.
 
uint64_t migration_start_ns
 When migration started in nanoseconds (for collection window timeout)
 
host_lost_candidate_t * migration_candidates [16]
 Candidates received during migration.
 
participant_t * participants [16]
 Participant array (in-memory only)
 

Detailed Description

Session entry data structure.

Contains all session metadata. Stored in SQLite database.

Definition at line 51 of file include/ascii-chat/discovery/session.h.

Field Documentation

◆ capabilities

uint8_t session_entry::capabilities

bit 0: video, bit 1: audio

Definition at line 56 of file include/ascii-chat/discovery/session.h.

◆ created_at

uint64_t session_entry::created_at

Unix timestamp (ms) - when session was created.

Definition at line 65 of file include/ascii-chat/discovery/session.h.

◆ current_participants

uint8_t session_entry::current_participants

Active participant count.

Definition at line 58 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ expires_at

uint64_t session_entry::expires_at

Unix timestamp (ms) - absolute max lifetime (created_at + 24h)

Definition at line 66 of file include/ascii-chat/discovery/session.h.

◆ expose_ip_publicly

bool session_entry::expose_ip_publicly

Allow IP disclosure without verification (explicit opt-in via –acds-expose-ip)

Definition at line 62 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ has_password

bool session_entry::has_password

Password protection flag.

Definition at line 61 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ host_address

char session_entry::host_address[64]

Host's reachable address (valid if host_established)

Definition at line 77 of file include/ascii-chat/discovery/session.h.

◆ host_connection_type

uint8_t session_entry::host_connection_type

acip_connection_type_t: how to reach host

Definition at line 79 of file include/ascii-chat/discovery/session.h.

◆ host_established

bool session_entry::host_established

Whether a host has been designated (false = still negotiating)

Definition at line 75 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ host_participant_id

uint8_t session_entry::host_participant_id[16]

Current host's participant_id (valid if host_established)

Definition at line 76 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ host_port

uint16_t session_entry::host_port

Host's port (valid if host_established)

Definition at line 78 of file include/ascii-chat/discovery/session.h.

◆ host_pubkey

uint8_t session_entry::host_pubkey[32]

Host's Ed25519 key.

Definition at line 55 of file include/ascii-chat/discovery/session.h.

◆ in_migration

bool session_entry::in_migration

Currently collecting HOST_LOST packets.

Definition at line 82 of file include/ascii-chat/discovery/session.h.

◆ initiator_id

uint8_t session_entry::initiator_id[16]

First participant who created/joined the session.

Definition at line 74 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ last_activity_at

uint64_t session_entry::last_activity_at

Unix timestamp (ms) - updated on join/leave/host updates (cleanup uses this)

Definition at line 67 of file include/ascii-chat/discovery/session.h.

◆ max_participants

uint8_t session_entry::max_participants

1-8

Definition at line 57 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ migration_candidates

host_lost_candidate_t* session_entry::migration_candidates[16]

Candidates received during migration.

Definition at line 84 of file include/ascii-chat/discovery/session.h.

◆ migration_start_ns

uint64_t session_entry::migration_start_ns

When migration started in nanoseconds (for collection window timeout)

Definition at line 83 of file include/ascii-chat/discovery/session.h.

◆ participants

participant_t* session_entry::participants[16]

Participant array (in-memory only)

Definition at line 86 of file include/ascii-chat/discovery/session.h.

Referenced by session_entry_destroy().

◆ password_hash

char session_entry::password_hash[128]

Argon2id hash (if has_password)

Definition at line 60 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ server_address

char session_entry::server_address[64]

IPv4/IPv6 address or hostname.

Definition at line 70 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ server_port

uint16_t session_entry::server_port

Port number for client connection.

Definition at line 71 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ session_id

uint8_t session_entry::session_id[16]

UUID.

Definition at line 53 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ session_string

char session_entry::session_string[(38+1)]

e.g., "affectionate-acquaintance-acquaintance"

Definition at line 52 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().

◆ session_type

uint8_t session_entry::session_type

acds_session_type_t: 0=DIRECT_TCP, 1=WEBRTC

Definition at line 63 of file include/ascii-chat/discovery/session.h.

Referenced by database_session_join().


The documentation for this struct was generated from the following file: