ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
acds.h File Reference

ascii-chat Discovery Service (ACDS) Protocol Message Formats More...

Go to the source code of this file.

Macros

ACDS Protocol Constants
#define ACIP_SESSION_EXPIRATION_MS   (24ULL * 60 * 60 * 1000)
 Maximum session string length (e.g., "swift-river-mountain" = 20 chars).
#define ACIP_DISCOVERY_DEFAULT_PORT   OPT_ACDS_PORT_INT_DEFAULT
 Discovery server default port (use OPT_ACDS_PORT_INT_DEFAULT from options.h).
#define ACIP_HOST_DEFAULT_PORT   OPT_PORT_INT_DEFAULT
 Default port for discovery mode hosts (use OPT_PORT_INT_DEFAULT from options.h).
#define ACDS_OFFICIAL_SERVER_HOSTNAME   "discovery-service.ascii-chat.com"
 Official ACDS server hostname (automatic HTTPS key trust).

Enumerations

enum  acds_session_type_t { SESSION_TYPE_DIRECT_TCP = 0 , SESSION_TYPE_WEBRTC = 1 }
 Session connection type. More...

Variables

ACDS WebRTC Signaling Messages
 acip_webrtc_sdp_t
 acip_webrtc_ice_t
ACDS String Reservation Messages (Future)
 acip_string_reserve_t
 acip_string_reserved_t
 acip_string_renew_t
 acip_string_release_t
ACDS Ring Consensus Protocol (New P2P Design)

NEW ARCHITECTURE: Proactive future host election every 5 minutes. Participants form a virtual ring and rotate who collects NAT data. Every 5 minutes, a new "quorum leader" emerges with complete knowledge and elects the future host. This pre-elected host is announced to all participants so they know who will take over if current host dies.

Benefits:

  • No election delay when host dies (future host already known)
  • Fresh NAT data every 5 minutes (not stale)
  • Automatic rotation ensures fair load (each participant gets a turn)
  • Ring topology enables P2P coordination without central ACDS
 acip_participant_list_t
 acip_participant_entry_t
 acip_ring_collect_t

ACDS Discovery Mode Messages (Host Negotiation & Migration)

enum  acip_nat_type_t {
  ACIP_NAT_TYPE_OPEN = 0 , ACIP_NAT_TYPE_FULL_CONE = 1 , ACIP_NAT_TYPE_RESTRICTED = 2 , ACIP_NAT_TYPE_PORT_RESTRICTED = 3 ,
  ACIP_NAT_TYPE_SYMMETRIC = 4
}
 NAT type classification for host selection. More...
enum  acip_connection_type_t { ACIP_CONNECTION_TYPE_DIRECT_PUBLIC = 0 , ACIP_CONNECTION_TYPE_UPNP = 1 , ACIP_CONNECTION_TYPE_STUN = 2 , ACIP_CONNECTION_TYPE_TURN = 3 }
 Connection type for host announcement. More...
 acip_nat_quality_t
 acip_host_announcement_t
 acip_host_designated_t
 acip_host_lost_t
 acip_future_host_elected_t

ACDS Error Handling

enum  acip_error_code_t {
  ACIP_ERROR_NONE = 0 , ACIP_ERROR_SESSION_NOT_FOUND = 1 , ACIP_ERROR_SESSION_FULL = 2 , ACIP_ERROR_INVALID_PASSWORD = 3 ,
  ACIP_ERROR_INVALID_SIGNATURE = 4 , ACIP_ERROR_RATE_LIMITED = 5 , ACIP_ERROR_STRING_TAKEN = 6 , ACIP_ERROR_STRING_INVALID = 7 ,
  ACIP_ERROR_INTERNAL = 255
}
 ACIP error codes. More...
 acip_error_t
 acip_bandwidth_test_t
 acip_bandwidth_result_t
 acip_broadcast_ack_t

ACDS Session Management Messages

 acip_session_create_t
 acip_session_created_t
 acip_session_lookup_t
 acip_session_info_t
 acip_session_join_t
 acip_session_joined_t
 acip_participant_joined_t
 acip_participant_left_t
 acip_session_leave_t
 acip_session_end_t
 acip_session_reconnect_t
struct __attribute__ ((packed))
 SESSION_CREATE (PACKET_TYPE_ACIP_SESSION_CREATE) - Create new session.

Detailed Description

ascii-chat Discovery Service (ACDS) Protocol Message Formats

Definition in file acds.h.