Summary:
WebSocket implementation of ServerAdapter.
About the setup payload:
RSocket uses a setup payload sent by the client when the initial handshake takes place.
WebSocket handshake doesn't use one.
Instead, it is proposed to use the URL query string to embed any arguments that the server may require to correctly identify and verify a client.
This is the case for the existing Browser WebSocket server.
The only extra adjustment was made for the CSR, proposed to be Base64 encoded.
There's no particular reason to Base64 encode it, as it was already tested by simply escaping any necessary characters.
I feel Base64 adds a layer of simple obfuscation that although doesn't offer any security, it abstracts the content to the URL reader.
The only concern was about the URL maximum length. It seems to be accepted that URL lengths should be at most 2048 characters.
Also, it seems to be the case that the PEM encoded public key size is 451 characters.
That, combined with all the extra necessary arguments, the final URL seem to fit well within the 2048 characters limit.
Reviewed By: passy
Differential Revision: D30014341
fbshipit-source-id: f3e13754b9e513eb84473e45de03f9e101c73862