Skip to content
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

[Suggestion] Add Latent Server Callback Support #651

Open
FingerlessGlov3s opened this issue Oct 13, 2024 · 0 comments
Open

[Suggestion] Add Latent Server Callback Support #651

FingerlessGlov3s opened this issue Oct 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@FingerlessGlov3s
Copy link

Is your feature request related to a problem? Please describe.
You can use TriggerLatentClientEvent function to send data to a client that doesn't block the clients network channel. So it would be great if we could register a latent callback instead when needed. This would be more flavourful when sending large amounts of data or for non time critical events, to stop blocking of the client network channel.

Describe the solution you'd like
A function like lib.callback.register call it say lib.callback.registerLatent, which uses TriggerLatentClientEvent instead of TriggerClientEvent for client and TriggerLatentServerEvent instead of TriggerServerEvent for server.

Default of bps of 50000 with an argument to higher or lower it.

Additional context
https://docs.fivem.net/docs/scripting-manual/working-with-events/triggering-events/#triggering-latent-server-events
https://docs.fivem.net/docs/scripting-manual/working-with-events/triggering-events/#triggering-latent-client-events

Hope this makes sense 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant