This site is being deprecated.

Please see the official X‑Plane Support page for help.

0 votes
asked by (18 points)
Hello,

I'm developing an application that interacts with x-plane 10.5 using UDP (I'm forced to use the UDP method so please, don't tell me to use the SDK). My application is meant to work with multiplayer so I'm trying to set all the network parameters (ip and port) for all the players automatically, using UDP. I'm using the ISET Data structure for this purpose:

struct iset_struct // IP settings

{

   xint index;

   xchr snd_ip_str[16] ; // IP's we are sending to, in english

   xchr snd_pt_str[ 6] ; // ports are easier to work with in STRINGS!

   xint snd_use_ip ; // 1 or 0 to turn this option on or off

};

This is an example of how I'm filling the structure:

(All of the fields are strings that I convert into bytes)

   1

   010.125.124.022

   49000

   1

X-plane seems to receive the structures but doesn't get the ip. If I go to Network Connections, I can see that x-plane added a player with the index and port I sent but it never fills the ip. What am I doing wrong? Am I not filling the IP properly? It seems that I'm filling the structure with the exact number of bytes because it reads the port number correctly.

I'm not sure what the comment next to the IP field means ("IP's we are sending to, in english"). I've been trying to use different encodings for the ip (UTF-8, Unicode, etc) but none of them seems to affect the ip.

 

Thanks!

1 Answer

0 votes
answered by (866 points)
One of the more enlightened tech-people will need to answer this one. :)
...