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

Fix: Packet queue adjustments #648

Merged

Conversation

RyanYappert
Copy link
Collaborator

Followup on some discussion about packet queues and handlers.

  • Adjusts RequestPacketQueueHandler so that it expects a PacketQueue from its Handle.
  • Adjusts the job change and equip change handlers so that they use PacketQueues and not the god awful casting that was present before.

Checklist:

  • The project compiles
  • The PR targets develop branch

Copy link
Collaborator

@pacampbell pacampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking at a private server for a different game and all packets they send use a packet queue which the handlers push into. I wonder if it makes sense to eventually move to something like that for all handlers in our server?

@RyanYappert
Copy link
Collaborator Author

I was looking at a private server for a different game and all packets they send use a packet queue which the handlers push into. I wonder if it makes sense to eventually move to something like that for all handlers in our server?

There's a ConcurrentQueue that's thread-safe and could be used for this. I assume the server object would have one, and a dedicated thread would just churn through the queue as fast as it can, rather than splitting up packet output across multiple threads. Might be a good design, but it'd definitely involve some major refactoring to that core machinery.

@RyanYappert RyanYappert force-pushed the fix/packet-queue-adjustments branch from 38754b0 to bdbb55c Compare December 6, 2024 06:41
@RyanYappert RyanYappert merged commit 1d93bb9 into sebastian-heinz:develop Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants