Wsd.close ~code:1000 sends a close frame with status 1000, but Wsd.close without ~code appears to just hard-close the WebSocket connection. This might not be unreasonable, but IMO it should be documented, because another reasonable interpretation is that omitting ~code should cause a default code to be sent.
In
https://github.com/anmonteiro/websocketaf/blob/248a2cb0dcffa51996c3ad7643577dce75d67454/lib/wsd.ml#L62-L72
Wsd.close ~code:1000
sends a close frame with status 1000, butWsd.close
without~code
appears to just hard-close the WebSocket connection. This might not be unreasonable, but IMO it should be documented, because another reasonable interpretation is that omitting~code
should cause a default code to be sent.