TwinFan / XPPlanes

Display additional planes controled by network messages
https://twinfan.github.io/XPPlanes/
2 stars 1 forks source link

setsockopt issues creating sockets #3

Closed tompolth closed 4 months ago

tompolth commented 4 months ago

​ 533 / 5.000 Hello, I am trying to test the XPPlanes example on my Xplane but I get the following errors when establishing the socket to connect the plugin with an external client:

0:00:00.000 XPPlanes INFO  main.cpp:321/XPluginEnable: Enabled
0:00:00.000 XPPlanes/XPMP2 WARN  Network.cpp:911/Join: MC 127.0.0.1:49900: setsockopt(IP_ADD_MEMBERSHIP) failed for intf Loopback Pseudo-Interface: 10049 - Unknown error
0:00:00.000 XPPlanes/XPMP2 WARN  Network.cpp:911/Join: MC 127.0.0.1:49900: setsockopt(IP_ADD_MEMBERSHIP) failed for intf Ethernet 7: 10049 - Unknown error
0:00:00.000 XPPlanes ERROR Listener.cpp:153/ListenMain: Exception in listener: setsockopt(IP_ADD_MEMBERSHIP) failed for all interfaces!: Unknown error

I have tried disabling all the simulator plugins but the result is always the same. I have created two simple programs in Python that would act as client and server respectively, sending UDP messages via IP 127.0.0.1 to port 49900 and they worked correctly. Could someone tell me what the problem could be? By the way, a friend of mine has used the same plugin and worked seamlessly

Thank you in advance

tompolth commented 4 months ago

Solved. I had to change the IP to 239.255.1.1 in the XPPlanes.prf file in output/preferences

TwinFan commented 4 months ago

Yes...because that is a multicast address while 127.0.0.1 is not (but the local loopback device). And it is the default, too.