As of net 8 we can use ValueTasks overload of the Socket async methods:
- Socket.ConnectAsync
- Socket.ReceiveAsync
- Socket.SendAsync
This would allow more efficient sending & receiving of messages with less allocations.
Send & Receive are in the hot path, so this will improve allocations for most usecases