Unified Stream-based implementation for hardware and software serial communication.