@hyperfrontend/network-protocol/node/sendersender
Node.js-side outbound packet sender with serialization and encryption pre-wired.
createSender builds a Sender from a SendFn transport callback (typically a TCP socket write, a process.send IPC call, or a WebSocket.send) and the protocol-specific encryption pipeline. The returned sender exposes the OutboundQueue / OutboundQueues interface so callers can enqueue messages without thinking about packet construction; serialization, encryption, and obfuscation happen inside the queue before the wire callback fires. Pair with /node/receiver on the other end and a protocol from /node/v1 or /node/v2. Function signatures match /browser/sender so cross-runtime communication is symmetric.
API Reference
◈ Interfaces
Represents an outbound processing queue with measurable size
Properties
Collection of outbound processing queues
Sender interface for processing outbound packets
Properties
◆ Types
Factory function type for creating a Sender instance
type CreateSender = (label: string, sender: SendPacketFn, logger: Logger, packetEncryption: PacketEncryption<T>, packetObfuscation: PacketObfuscation) => Sender<T>Function to send data from an origin to a target
type SendFn = (origin: string, target: string, data: Data<T>) => voidCallback invoked to transmit raw packet bytes
type SendPacketFn = (packet: Uint8Array) => void