code wiki / _hdl_build / nx_ws_client_session.nx

nx_ws_client_session.nx

buildroot/runtime/_hdl_build/nx_ws_client_session.nx

7556 B139 linesdepth 19pulls 129 transitivereach 5 importersview sourcekind librarytopic ws
docsdependenciesstructsconstsfunctions

about

nx_ws_client_session.nx -- shared sovereign WSS-over-TLS1.3 CLIENT SESSION helpers. Extracted from nx_video_2party_probe so the mobile-native room client and the probe share ONE implementation instead of copy-pasting the TLS-record + RFC-6455 framing glue (rule #15 DRY / the operator's SSOT direction). No main -- import this and call wscs_connect / wscs_send / wscs_ws_recv. These are the transport a ZERO-JS, ZERO-browser NishiLang client (mobile-native) uses to join a live room. license_tier: ORIGINAL

dependencies 10 imports · 5 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_get_complete.nx nx_websocket_client_upgrade.nx nx_websocket_frame.nx nx_ws_client_session.nx nx_video_2party_probe.nx nx_video_native_client_gate.nx nx_video_native_video_gate.nx nx_video_qoe_live.nx nx_video_swarm_probe.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nxnx_websocket_client_upgrade.nxnx_websocket_frame.nx

imported by: nx_video_2party_probe.nxnx_video_native_client_gate.nxnx_video_native_video_gate.nxnx_video_qoe_live.nxnx_video_swarm_probe.nx

structs

none

consts

17const WSCS_MAGIC_16645: i64 = 16645
18const WSCS_MAGIC_131072: i64 = 131072
19const WSCS_MAGIC_4096: i64 = 4096
20const WSCS_MAGIC_65536: i64 = 65536
22const WSCS_TMO_S: i64 = 12

functions

25func wscs_send(s: *Tls13ClientSession, fd: i64, bytes: *u8, blen: i64) -> i64
40func wscs_recv_headers(s: *Tls13ClientSession, fd: i64, out: *u8, cap: i64) -> i64
67func wscs_ws_recv(s: *Tls13ClientSession, fd: i64, out: *u8, cap: i64) -> i64
105func wscs_connect(store: *TrustStore, url: *u8, kseed: i64, sess_out: *i64, fd_out: *i64) -> i64