This repository was archived by the owner on Feb 21, 2020. It is now read-only.
Conversation
UDP address is currently INADDR_ANY = 0.0.0.0. Sends "abc" over UDP. Old code had network_worker::worker_method() continually poll the network queue to either send, recv, or queue another recv. New code uses select, which replaces all recv network queue items since we just receive when the fd has data. Sending checks for an open fd first then polls the network queue to see if we need to send. Now that recv is removed, send queue items *should* be the only thing we need in the network queue. Removed some references to poll and acks in networking. TODO modify circular_buffer to send data in the proper format.
Organizing stuff before I start working on the circular buffer sending.
Copies header and data into a new char array and sends it in one go as a large datagram. Not sure if this will affect memory/speed enough to matter. Need to clean things up as it was a quick and dirty test. Can remove write_data now that we have this method.
Member
|
@ty19 does this PR move real-time data transfer over UDP (and merges header and body into a single packet)? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add UDP for sending. Tested with final_mocked and python code in add_udp branch of mk1-1-frontend.
Changed files:
TODO:
Does nbytes include the size of the header? Size of payload data is currently 16 bytes (i.e. size of header) less than nbytes when received. Not sure if this is expected.