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

Implementation of Broadcast Packet Reception in F1 2022 UDP Parser #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

papiricoh
Copy link

@papiricoh papiricoh commented May 22, 2023

Hello raweceek and PrimeGoose,

This pull request contains several important updates to the F1 2022 UDP Parser, focusing primarily on the reception of broadcast packets, but also including some dependency updates.

Broadcast Packet Reception

Previously, the UDP parser was set up to only receive data directly transmitted to it. However, this approach had its limitations, especially when the game data was being broadcasted across a network. To address this, I have made two key changes:

  1. I have updated the address in the UDP socket binding from the specific localhost address to the general '0.0.0.0'. This allows the parser to listen to all incoming traffic, not just those directly addressed to it.

this.socket.bind({port: this.port, address: '0.0.0.0'});

  1. After the socket binding, I have enabled the broadcast mode on the socket. This allows our server to receive broadcasted UDP packets.

this.socket.setBroadcast(true);

With these changes, the F1 2022 UDP parser is now capable of receiving broadcasted game data packets, thus increasing its usability across a network.

Dependency Updates

In addition to the broadcast updates, I have also taken this opportunity to update some of the dependencies. This ensures that the project is using the latest stable versions, benefiting from any recent bug fixes or improvements.

To ensure the efficacy and compatibility of these changes, extensive testing has been conducted in both non-broadcast and broadcast modes.

Comprehensive Testing

  1. Non-Broadcast Mode: This is the standard operating mode where the F1 2022 game sends data packets directly to a specified IP address. I conducted tests to ensure that the new changes do not interfere with this basic functionality. The results were positive, the updated UDP parser received the data packets as expected, ensuring compatibility with the original operation mode.

  2. Broadcast Mode: This is the mode of operation where the game data is broadcasted across the network. With the changes implemented, the UDP parser was successfully able to capture and parse these broadcasted packets. This proved the new functionality works as intended and significantly extends the use cases for the parser.

To further validate the new functionality, I integrated the updated UDP parser into my project. The application performed seamlessly with the updated dependency and was able to capture and process the F1 2022 game data in both non-broadcast and broadcast modes. This practical integration test reaffirms the backward compatibility and the extended functionality of the updated parser.

I am currently developing a small application that relies on this project, and these changes will significantly enhance its functionality. I am looking forward to seeing these updates reflected in the main project.

Many thanks for considering this request.

 Mention [stepsize] in a comment if you'd like to report some technical debt. See examples here.

@davelee212 davelee212 mentioned this pull request Nov 14, 2023
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.

1 participant