-
Notifications
You must be signed in to change notification settings - Fork 25
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
Socket cleanup #182
Socket cleanup #182
Conversation
Also rename TX bind function to match
Don't list loopback in nicselect dialog Work offline always selects loopback Listener socket binds to all, but only accept destinations that are addresses on that interface (and multicast sACN!)
A couple of things I noticed on a quick play. 1: QNetworkDatagram didn't exist in Qt 5.6, which we need for XP support.. so : probably need to fix that, then I can do some extended testing on at least windows and mac.. you want to eliminate the QNetworkDatagram reference? or I can.. 2: There's something funky in the sequence number logic, I keep getting the message Source coming up, not processing packet on a simple test of the application sending to itself. Needs some more digging to find out why. |
|
Windows (10, 64bit). I actually see problems both with and without the Listen all Interfaces option checked; 2 interfaces plus loopback, I'm listening on a wifi interface. I get a ton of sequence errors, in a simple case (run application, fire up a single source, double click on a universe to view it). Debug output below..
|
ip_multicast_loop seems to be not respected on Windows. Windows specific define added
ok, lets try this... Unfortunately I need the destination IP from the datagram, I don't see how to do this with out QNetworkDatagram. The older method only returns source... |
Use IFDEFs to support Qt5.6; disable multiple nic selection on windows
Take a quick look at branch marcusbirkin-SocketCleanup, in particular sacnlistener.cpp. I IFDEF'd out the QNetworkDatagram part, you can still get the sender, and I assume the destination IP is the IP of the socket. I think it's fine to disable multi-NIC reception for XP, so I added that. Works on a quick test on Win10, I'll have to find an XP machine to try it on.. |
Ensure multicast frame is sent to correct listener/thread Cross platform tweaks PCap - Restore send to self, but send to correct listener WinXP - Unable to listen to unicast
Commit: #3d324ab OS: Ubuntu 18.04.1 LTS Interface selection: Only physical interfaces shown. OK Interface: Physical interface
Interface: Physical interface
Interface: Work offline (Localhost)
|
Looking good now : tested on win10 and mac today. Results below. Haven't yet tested pcap support but good enough for a merge. OS: Windows 10 Enterprise 17134.523 Interface selection: Only physical interfaces shown. Interface: Physical interface
Interface: Physical interface
Interface: Work offline (Localhost)
OS: macOS Mojave 10.14 Interface selection: Only physical interfaces shown. Interface: Physical interface
Interface: Physical interface
Interface: Work offline (Localhost)
|
Resolves #179
Possible and likely cause of #167
The socket backend could receive frames multiple times, while this wouldn't have affected the resultant DMX data, it would affect the source statistics.
The socket arrangement has been altered, in particular multicast frames for display locally are passed internally and not re-received over the wire (Because Windows and Unix handle ip_multicast_loop slightly differently with multi homed machines, so this is simply disabled). Additionally the number of open sockets reduced.
This will require a good amount of testing to prove it's good. I'm unable to test on MacOS!