create UDPBoundSocket in forwardOpen #102
Open
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.
After testing with my device (Brooks SLA5800 series MFC), creating a bound socket () right away in the forwardOpen() call (rather than a ) allows EIPScanner to utilize the correct, default port (2222) for Implicit comms. Without this, two separate sockets were created, but only one would have connections handled by the library; this caused the device to eventually time-out the connection after receiving no O->T packets (from the correct port, verified with Wireshark). All existing GTests pass.
I haven't heard feedback, but I'm hopeful this would solve many implicit communications issues, including #64. Note the source port of IO packets in the attached "Working_IO-filtered" capture file. Log output:
Working_IO-filtered.pcapng.txt
Compare this with the source port of IO packets in the attached "Failing_IO-filtered" capture file. Log Output:
Failure_IO-filtered.pcapng.txt