norrisng / FcomClient

Forwards private and frequency messages on IVAO and VATSIM via Discord DM.
https://www.norrisng.ca/fcom
GNU General Public License v3.0
7 stars 3 forks source link

Aircraft config packets get forwarded #1

Open norrisng opened 5 years ago

norrisng commented 5 years ago

Aircraft config packets ($CQ, @N, @S etc.) also get forwarded by the client.

Examples (as seen inside Discord):

AAL123: Here's a test message $CQLAN2250:@94836:ACC:{"config":{"lights":{"strobe_on":true}}

LON_CTR: Insert message here @ N:EZY123:2000:1:47.81881:9.46934:33358:439:4257229744:-172

norrisng commented 5 years ago

It appears that these packets can appear before or after any message packet. Seems like multiple FSD packets are (randomly) bundled into a single TCP packet's payload.

norrisng commented 5 years ago

Packets are separated via line breaks, and it appears that existing clients enforce this by not allowing line breaks to be entered in messages.

For instance, when text containing line breaks are pasted into vPilot, it will remove everything after the first line break.

In other words, it should be safe to assume that \r\n marks the end of an FSD packet in all cases.