sendUDP and readUDP were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions.
sendUDP and readUDP were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions.
The C client previously set a very short read timeout because it was required
by the plugin. To compensate for this on the client side, we would try to
read several times in a loop. Since the plugin no longer uses the C client for
networking, we can do away with the loops and set a proper timeout.
- Swaped names of openUDP and aopenUDP.
- openUDP is now the "automatic" version, requiring only the X-Plane IP address.
- aopenUDP is now the "advanced" version, requiring both the X-Plane port and a client port.
- Added support for passing NULL to sendTEXT.
Fix Bug- readUDP loop in getDREF Response only ran once no matter what.
This wasn’t enough time for the plugin to send a response.
Note: You can try increasing the timeout, but the plugin has to have a
socket with a timeout of 1ms or less. If the timeout is higher than
that a lag is introduced.
- Fixed a buffer overflow in sendCTRL.
- Fixed incorrect inderection in readUDP.
- Removed unused usleep function.
- Removed redundant include of WS2tcpip.h
- Fixed widespread error where sendUDP's return value was not being checked correctly.
- Updated signature of openUDP to place optional parameters at the end
- Fixed bug in CTRL command where the buffer length was not correctly set.
- Fixed setCONN to correctlly reset the client's socket.
- Removed parseCTRL and readCTRL.
- Tweaked variable type, order and naming.
- Improved validation and error reporting.
- Updated Interface Control Document to reflect adition of aircraft number to CTRL command.
- Removed readPOSI and parsePOSI functions. These were only used by the plugin, which no longer uses them.
- Tweaked types, argument order, and names to improve concision and consistency with other functions.
- Improved validation and error reporting.
- printError is now a varags function, and will print format strings for the message.
- Removed several internal DREF functions from the header file.
- Significantly improved error reporting in DREF functions.
- Removed dynamic allocation for responses. Clients are now expected to provide fully allocated storage for getDREFs. An error message will be printed if the provided structure is too small.
- Fixesnasa/XPlaneConnect#30
- Tweaked signatures to improve consistency and safety.
- Improved error logging.
- Removed parseDATA. When merged into readDATA, the meat of parseDATA is only a few lines of code.
- Tweaked function signatures to more accurately reflect internal behavior.
- Changed behavior of setCONN to use the inbound port of the socket passed to it.
- Greatly enhanced error reporting for setCONN and pauseSim.
- Tweaked variable names to be more concise.
- Moved variable declarations from top of function to point of use.
- Replaced memcpy with strncpy where appropriate.
- Removed socket reuse options on *nix builds.
- Improved error reporting.
- Most failures when opening and closing sockets now cause the client to die.
- sendUDP now ignores the length byte.