From: Stuart Buchanan <stuart13@gm...> - 2012-12-24 22:45:33
> I am looking for someone with whom I can discuss some detail questions about
> FGs MP protocol.
I'm probably as good a person as anyone, though it's been a long time since I
looked at the code. In fact I had to read through it to remind myself
of how it works!
> I have written an application that communicates with running FG instances. I
> can receive all messages, but sometimes my messages seem to be lost.
> My understanding is this: Chat messages are sent inside the position update
> packages. At first I have sent them only once, but now I send them at least
> 10 times for at least 3 seconds. This code is there to prevent UDP drops.
> But it did not help.
There are two types of chat message :-
- Server messages (message ID 1) which are displayed to the console.
- MP Chat strings that are simply a string property
(sim/multiplay/chat) and sent
as part of the normal position messages when properties have changed.
I assume you are interested in the latter?
> Is there a hidden bug in my sending logic or do I something completely
Having not seen your code, I don't know if there's a bug :)
A couple of things spring to mind to check:
- If you are sending your message through and MP Server, your position data
needs to be within 50nm of the receiver, otherwise the MP Server will
- There's a bug in our XDR implementation that we pad each character to a 4-byte
word. See src/Multiplayer/multiplayermgr.cxx line 316, 728, 739.
(I think I introduced the bug when I wrote the original string XDR
parsing). I'd recommend
comparing your XDR encoding to check that it matches.
- The string property needs to have a suitable XDR identifier (10002)
to map it to the correct
I hope that helps.
Happy Christmas everyone!