You are not logged in.
Pages: 1
Sincerely, I lose myself inside mORMot
I do know many people in Delphi looks for websockets libraries, and find only a commercial one (esegece), and an open repo on GitHub, that seems not fully complete
Then I think mORMot has websockets implemented, but I don't really know if it can be used "detached" from the REST/HTTP/ORM stuff
At embarcadero website there is a post one an example using esegece websockets, just a simple chat:
https://blogs.embarcadero.com/example-w … plication/
I know there are examples in mORMot2 using interfaces, but I believe that would not be inbteroperable with other languages/platforms that also have websockets implemented (i.e. javascript)
Is it possible doing it as easily in mORMot? Obviously without non-visible components, but code-created Delphi classes
Offline
Hi, I’ve just published a project that you might want to check out. Its based of a larger project I’m working on (inspired by Rails ActionCable and designed to work with mormot MVC). I’ve stripped the code a bit, so you’ll get a WebSockets server and some event handling. I’ve also included a JS client for chat functionality.
I’ll try to create a lighter sample this weekend based on the example you linked from Embarcadero.
You will need NPM or yarn installed to run the js project. I can build it to be ran without js tooling, just let me know. Anyway, you can connect with any websockets client on `ws:127.0.0.1:8082/cable` endpoint.
Files of interest:
- chat_channel.pas
- token/token.pas
- http-server/ws_server.pas
Do not pay attention to InitMVCApp and other mvc things.. hope it help
Offline
You can take a look at
https://github.com/synopse/mORMot/blob/ … Server.dpr
This sample from mORMot 1 still applies, and it works with a JavaScript client and a mORMOt server.
Offline
Pages: 1