Normalize the various shapes ws may deliver an incoming message in (string, Buffer, Buffer[],
ArrayBuffer) into a UTF-8 string. Exported for direct unit testing because the default ws
configuration only emits Buffer for the JSON-stringified payloads sent by the client wrapper,
so the other branches are otherwise unreachable from the integration tests.
Normalize the various shapes
wsmay deliver an incoming message in (string, Buffer, Buffer[], ArrayBuffer) into a UTF-8 string. Exported for direct unit testing because the defaultwsconfiguration only emitsBufferfor the JSON-stringified payloads sent by the client wrapper, so the other branches are otherwise unreachable from the integration tests.