Closed WA9ACE closed 5 years ago
It's now possible to do this if you just override these functions https://github.com/socketry/protocol-websocket/blob/master/lib/protocol/websocket/connection.rb#L168-L189
Additionally, you could even define your own frame types (violating the spec of course), and do whatever you want w.r.t. reading and writing frames, using @framer
directly.
Make your own connection class and use Async::WebSocket::Client.open(..., connect: MyConnection)
or Async::WebSocket::Server::Rack.open(env, connect: MyConnection)
.
The form data takes across the websocket should be the responsibility of the application developer and not the library. In its current form you cannot use anything but JSON payloads removing the ability to send anything such as XML or ProtoBuffers across the wire.