New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from websockets to see #39
Comments
|
Had a quick try at implementing it with the current code base. Then, tried to do it with Lua but... No success. I've tried to explain to the best of my ability what I think is wrong in commit 735df7b. In the mean time, I will look at re-writing the resource in C#. More specifically, dotnet. Hopefully I can get something working kind of like webadmin. Afaik, this resource does SSE successfully with an So, more research is required and, possibly, a rewrite is needed. Note: The server-side events and stuff will all still be the same. This will not be a "breaking" change to others depending on the resource. It will however, need another version of the interface to work... Which, I will try and do as simply as possible. Hopefully it's just a matter of swicthing from Websockets to the EventSource API. |
|
Pretty sure this is not possible with the current implementation of FiveM. For some reason the headers don't seem to be sent to the client which, causes browsers' requests to hang until the connection is closed. I've got a C# implementation over on commit 208bd3b. If anyone knows if any way of getting SSE to work on FiveM, do contact me on here. As for now, going to stop working on trying to get SSE working... Good bye dreams of having a secure LiveMap out-of-the-box 😞 |
|
is there any simple implementation to get the websocket offline and read the coords of every player from a mysql database for example? that server updates every x minutes? |
Websockets are probably not the best technology to use for LiveMap. We don't send any data back from the client so, SSE is looking more promising.
Plus, if we start to use SSE's we can take advantage of FiveM's reverse proxy and move their installations to Ssl-enabled websites.
Obviously this would need a re-write of the interface.
It wouldn't be breaking on the resource side (no changes to the API) . Maybe would on the interface)(as we're scrapping websockets all together which, might be relied on by custom scripts).
The text was updated successfully, but these errors were encountered: