Custom WebSocket protocol with packet-loss recovery
The wearable streams continuous oxygen saturation, pulse rate and dual-vector respiration over hospital wireless, which means occasional packet loss is the baseline reality, not an edge case. Vanilla WebSocket recovery would reconnect after a drop but leave a silent gap in the waveform — clinically unacceptable for a tool a nurse watches to catch patient deterioration. I designed the message protocol with sequence numbers, server-side buffering with replay on reconnect, and an explicit “gap detected” marker that the UI renders whenever replay isn't possible — so the absence becomes visible instead of hidden.
The catch· More protocol surface than a plain WebSocket reconnect. In exchange, the waveform on a clinician's screen is continuous, and the moments where continuity actually fails are explicit instead of silent.