I do not know if this is required, but for WebSocket.cs call:
private bool send (Opcode opcode, Stream sourceStream)
send lock is put prematurely. This will violate RFC behaviour described in: https://datatracker.ietf.org/doc/html/rfc6455#section-5.5
Also makes option KeepClean switch useless when sending larger data or network stream is getting slow. Ping request is stalled until fragmented transfer finish transfer, but should be sent in between data fragments as RFC allows it. Because of this and flawed internal logic, connection can be closed due to Ping not responding with KeepClean set to true.
Current workaround is to implement custom Ping/Pong logic.