You are not logged in.
Hello Arnaud,
I was asking about the possibility of adding a callback event like TOnWebSocketProtocolBinrayIncomingFrame to the TWebSocketProtocolBinary.
As it already has everything needed for us and no need to reimplement what is already done, the compression and encryption and both working just fine.
The only thing we need is a callback for each new frame in "ProcessIncomingFrames" if the callback is set.
Regards.
Mac, Windows, Linux
FPC Trunk, Lazarus Trunk, Delphi 13.x Latest
Offline
Hello,
As I wrote in https://github.com/synopse/mORMot2/issues/419
TWebSocketProtocolBinary is not the place to implement such a callback.
It just can't work because it is a bidirectional REST emulation wrapper over websockets, not a plain websockets protocol.
Since you want to make a proprietary websockets protocol, what is wrong with our REST approach?
It is already efficient, and you can consume it on both sides and define your services and your callbacks with plain interfaces.
If you want something "standard", then you could just use the socketio protocol over WebSockets - we support it at least for the client side.
Or just use the "chat" protocol using JSON over HTTPS so that it would be encrypted with a standard protocol. Using JSON would probably be the best option, since it could be consumed from any client, e.g. a JavaScript/web application.
Offline