pub(crate) async fn read_export_request(
socket: &mut WebSocket,
) -> Result<ExportRequest>Expand description
Reads the initial JSON export request from a WebSocket.
The first message must be a text message holding an ExportRequest. If it
is any other message type, an error frame with expected JSON request is
sent first.
§Arguments
socket- WebSocket to read from.
§Errors
Returns an error if the socket closes or fails before a message arrives, if the
first message is not text, or if the text is not a valid ExportRequest.