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

Result from session discovery. More...

#include <include/ascii-chat/network/mdns/discovery.h>

Public Types

enum  { DISCOVERY_SOURCE_MDNS = 0 , DISCOVERY_SOURCE_ACDS = 1 }

Data Fields

bool success
 Discovery succeeded.
uint8_t host_pubkey [32]
 Ed25519 public key of discovered server.
char server_address [256]
 Server IP or hostname.
uint16_t server_port
 Server port (typically 27224).
enum discovery_result_t:: { ... }  source
 Which discovery method found the server.
char mdns_service_name [256]
 mDNS service instance name (e.g., "swift-river-mountain")
char mdns_hostname [256]
 mDNS hostname (e.g., "mycomputer.local")
uint8_t session_id [16]
 ACDS session UUID.
uint8_t participant_id [16]
 Assigned participant ID (from SESSION_JOIN).
asciichat_error_t error
 Error code if !success.
char error_message [256]
 Human-readable error (if !success).

Detailed Description

Result from session discovery.

Returned by discover_session_parallel() with connection info for the discovered server.

Definition at line 92 of file discovery.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DISCOVERY_SOURCE_MDNS 

Found via mDNS (local LAN).

DISCOVERY_SOURCE_ACDS 

Found via ACDS (internet).

Definition at line 97 of file discovery.h.

97 {
100 } source;
enum discovery_result_t::@335075210033063074377072145063374373365157111022 source
Which discovery method found the server.
@ DISCOVERY_SOURCE_ACDS
Found via ACDS (internet).
Definition discovery.h:99
@ DISCOVERY_SOURCE_MDNS
Found via mDNS (local LAN).
Definition discovery.h:98

Field Documentation

◆ error

asciichat_error_t discovery_result_t::error

Error code if !success.

Definition at line 111 of file discovery.h.

◆ error_message

char discovery_result_t::error_message[256]

Human-readable error (if !success).

Definition at line 112 of file discovery.h.

◆ host_pubkey

uint8_t discovery_result_t::host_pubkey[32]

Ed25519 public key of discovered server.

Definition at line 94 of file discovery.h.

◆ mdns_hostname

char discovery_result_t::mdns_hostname[256]

mDNS hostname (e.g., "mycomputer.local")

Definition at line 104 of file discovery.h.

◆ mdns_service_name

char discovery_result_t::mdns_service_name[256]

mDNS service instance name (e.g., "swift-river-mountain")

Definition at line 103 of file discovery.h.

◆ participant_id

uint8_t discovery_result_t::participant_id[16]

Assigned participant ID (from SESSION_JOIN).

Definition at line 108 of file discovery.h.

◆ server_address

char discovery_result_t::server_address[256]

Server IP or hostname.

Definition at line 95 of file discovery.h.

◆ server_port

uint16_t discovery_result_t::server_port

Server port (typically 27224).

Definition at line 96 of file discovery.h.

◆ session_id

uint8_t discovery_result_t::session_id[16]

ACDS session UUID.

Definition at line 107 of file discovery.h.

◆ []

enum { ... } discovery_result_t::source

Which discovery method found the server.

Referenced by discover_session_parallel().

◆ success

bool discovery_result_t::success

Discovery succeeded.

Definition at line 93 of file discovery.h.

Referenced by discover_session_parallel().


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