AspNet (DotNet 5) - send JSON data via Websocket in a performant manner

Viewed 524

I want to Serialize Objects to JSON and send them via AspNet5 Core Websocket.

What is the most performant way to do this?

There is the Utf8JsonWriter which can write to a Stream directly, but from AspNet I only get the Websocket class, which has the SendAsync function.

Is there no way to send the data, without creating a temporary Memorystream?

0 Answers
Related