Expand description
WebRTC signaling types compatible with iris-client and hashtree-ts
Structs§
- Answer
Message - WebRTC answer message
- Candidate
Message - ICE candidate message
- Candidates
Message - Batched ICE candidates message (hashtree-ts extension)
- Data
Request - Hashtree data channel protocol messages Shared between WebRTC data channels and WebSocket transport
- Data
Response - Hello
Message - Hello message for peer discovery
- Offer
Message - WebRTC offer message
- PeerHTL
Config - Per-peer HTL decrement configuration (Freenet-style) Stored per peer connection to prevent probing attacks
- PeerId
- Peer identifier combining pubkey and session UUID
- Peer
Status - Peer connection status
- Pool
Config - Configuration for a peer pool
- Pool
Settings - Pool settings for both pools
- WebRTC
Config - Configuration for WebRTC manager
Enums§
- Data
Message - Peer
Direction - Direction of peer connection
- Peer
Pool - Pool type for peer classification
- Peer
State Event - Peer state change event for signaling layer notification
- Signaling
Message - All signaling message types
Constants§
- DECREMENT_
AT_ MAX_ PROB - DECREMENT_
AT_ MIN_ PROB - HELLO_
TAG - Tag for hello messages (broadcast discovery)
- MAX_HTL
- MSG_
TYPE_ REQUEST - Message type bytes (prefix before MessagePack body)
- MSG_
TYPE_ RESPONSE - WEBRTC_
KIND - Event kind for WebRTC signaling (ephemeral kind 25050) All signaling uses this kind - hellos use #l tag, directed use gift wrap
- WEBRTC_
TAG - Legacy tag for WebRTC signaling messages (kept for compatibility)
Functions§
- decrement_
htl - Decrement HTL using Freenet-style probabilistic rules
- encode_
message - Encode a DataMessage to wire format (deprecated - use encode_request/encode_response)
- encode_
request - Encode a request to wire format: [0x00][msgpack body] Uses named fields for cross-language compatibility with TypeScript
- encode_
response - Encode a response to wire format: [0x01][msgpack body] Uses named fields for cross-language compatibility with TypeScript
- generate_
uuid - Generate a UUID for peer identification
- hash_
to_ hex - Convert hash to hex string for logging/map keys
- parse_
message - Parse a wire format message
- should_
forward - Check if a request should be forwarded based on HTL