Comments (3)
Had a quick try at implementing it with the current code base. Then, tried to do it with Lua but... No success.
My attempt is over at https://github.com/TGRHavoc/live_map/tree/failed/sse and doesn't work. It's just there to show that I am actively working on trying to find a solution.
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 /events
endpoint.
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.
God, I hope it's that simple.
from live_map.
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 😞
from live_map.
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?
from live_map.
Related Issues (20)
- Access denied for command blips. HOT 1
- Error with starting the resource HOT 5
- Player not getting tracked after removing and triggering "livemap:AddPlayerData" HOT 3
- [question]: convert lat & lng back to GTA map coords HOT 4
- [question]: how to convert lng & lat to x, y ,z HOT 2
- Question HOT 4
- Having a error with loading the map ((((Error getting blips! Maybe the server is down or, the config is setup incorrectly.)))) HOT 6
- Question (not urgent, also sorry for all the questions recently) HOT 7
- License Plate doesn't get removed from data HOT 7
- Add dynamic blips HOT 8
- Documentation
- Location on livemap is somewhat off HOT 1
- High resource usage HOT 8
- Live map not found as a resource. HOT 2
- Bug: 'localhost' = 200, '127.0.0.1' = 404 HOT 21
- Nucleus proxy not functioning HOT 7
- So i have set up everything to run this with snaily cad system v4 and it still refuses to connect here are my settings below along with some pictures HOT 1
- Issue with the websockets HOT 1
- Reverse hashing not working HOT 3
- Not seems to work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from live_map.