ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
acds_client_data_t Struct Reference

Per-client connection data. More...

#include <src/discovery-service/server.h>

Data Fields

uint8_t session_id [16]
 Session UUID (valid if joined_session)
 
uint8_t participant_id [16]
 Participant UUID (valid if joined_session)
 
bool joined_session
 Whether client has successfully joined a session.
 
crypto_handshake_context_t handshake_ctx
 Handshake context for encrypted communication.
 
bool handshake_complete
 Whether crypto handshake has completed.
 
bool in_multikey_session_create
 True during multi-key SESSION_CREATE sequence.
 
acip_session_create_t pending_session
 Pending session data (from first SESSION_CREATE)
 
uint8_t pending_session_keys [MAX_IDENTITY_KEYS][32]
 Array of identity public keys.
 
size_t num_pending_keys
 Number of keys received so far.
 

Detailed Description

Per-client connection data.

Stored in tcp_server client registry to track which session and participant this connection represents. Used by signaling relay to map participant_id → socket for message delivery.

Multi-Key Session Creation Protocol:

When creating a session with multiple identity keys (e.g., SSH + GPG):

  1. Client sends SESSION_CREATE with first key (creates session UUID)
  2. Client sends SESSION_CREATE with second key (adds to same session)
  3. Client sends SESSION_CREATE with zero key (finalizes session)

During multi-key creation:

  • in_multikey_session_create = true
  • All keys stored in pending_session_keys[]
  • Only PING/PONG allowed, other messages blocked
  • Keys validated to ensure no duplicates

Definition at line 57 of file discovery-service/server.h.

Field Documentation

◆ handshake_complete

bool acds_client_data_t::handshake_complete

Whether crypto handshake has completed.

Definition at line 64 of file discovery-service/server.h.

Referenced by acds_client_handler().

◆ handshake_ctx

crypto_handshake_context_t acds_client_data_t::handshake_ctx

Handshake context for encrypted communication.

Definition at line 63 of file discovery-service/server.h.

Referenced by acds_client_handler().

◆ in_multikey_session_create

bool acds_client_data_t::in_multikey_session_create

True during multi-key SESSION_CREATE sequence.

Definition at line 67 of file discovery-service/server.h.

Referenced by acds_client_handler().

◆ joined_session

bool acds_client_data_t::joined_session

Whether client has successfully joined a session.

Definition at line 60 of file discovery-service/server.h.

Referenced by acds_client_handler().

◆ num_pending_keys

size_t acds_client_data_t::num_pending_keys

Number of keys received so far.

Definition at line 70 of file discovery-service/server.h.

◆ participant_id

uint8_t acds_client_data_t::participant_id[16]

Participant UUID (valid if joined_session)

Definition at line 59 of file discovery-service/server.h.

◆ pending_session

acip_session_create_t acds_client_data_t::pending_session

Pending session data (from first SESSION_CREATE)

Definition at line 68 of file discovery-service/server.h.

◆ pending_session_keys

uint8_t acds_client_data_t::pending_session_keys[MAX_IDENTITY_KEYS][32]

Array of identity public keys.

Definition at line 69 of file discovery-service/server.h.

◆ session_id

uint8_t acds_client_data_t::session_id[16]

Session UUID (valid if joined_session)

Definition at line 58 of file discovery-service/server.h.


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