This is my conclusion after trying for several days to implement Xamarin native WebSockets. I always try to not blame the framework but here this would have saved me quite some time. Everything was going wrong : packets were lost (especially if they were sent/received very quickly after the socket was opened, but it also happened later), and
ClientWebSocket.ReceiveAsync() sometimes received the same packet twice (or even got stuck receiving the same packet again and again in an infinite loop). There were also quite a bunch of other issues about DNS name resolution and other stuff... It was only after trying the exact same code on a standard .NET platform that I realized everything was working fine.
Anyway, I tried to switch from native WebSockets to websocket-sharp in my Xamarin app and now everything works fine. I wouldn't even know what bugs to report as there isn't even a single part that is working well. But I hope this post will be useful if anyone get the same problem. Don't waste your time trying to make the native WebSockets work properly.