code wiki / _hdl_build / nx_ws_client_session.nx
nx_ws_client_session.nx
buildroot/runtime/_hdl_build/nx_ws_client_session.nx
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
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
| 17 | const WSCS_MAGIC_16645: i64 = 16645 |
| 18 | const WSCS_MAGIC_131072: i64 = 131072 |
| 19 | const WSCS_MAGIC_4096: i64 = 4096 |
| 20 | const WSCS_MAGIC_65536: i64 = 65536 |
| 22 | const WSCS_TMO_S: i64 = 12 |
functions
| 25 | func wscs_send(s: *Tls13ClientSession, fd: i64, bytes: *u8, blen: i64) -> i64 |
| 40 | func wscs_recv_headers(s: *Tls13ClientSession, fd: i64, out: *u8, cap: i64) -> i64 |
| 67 | func wscs_ws_recv(s: *Tls13ClientSession, fd: i64, out: *u8, cap: i64) -> i64 |
| 105 | func wscs_connect(store: *TrustStore, url: *u8, kseed: i64, sess_out: *i64, fd_out: *i64) -> i64 |