1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Download Package Now!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

Useful UDP C++ code that needs improving

Discussion in 'Miscellaneous' started by traveltrousers, May 15, 2017.

  1. traveltrousers

    traveltrousers Active Member

    Joined:
    Jun 5, 2014
    Messages:
    116
    Location:
    Timbuktu, Tombouctou, Mali
    Balance:
    646Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    https://forum.unity3d.com/threads/simple-udp-implementation-send-read-via-mono-c.15900/

    has a couple of nice scripts that usually work, or at least I can use the receive script to grab UDP data from simtools. It doesn't handle errors very well, but I thought it would be useful for someone on here... especially if they have some suggestions for making it 100% reliable! :)
    • Useful Useful x 1
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. traveltrousers

    traveltrousers Active Member

    Joined:
    Jun 5, 2014
    Messages:
    116
    Location:
    Timbuktu, Tombouctou, Mali
    Balance:
    646Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    update:



    The UDP section in this tutorial works perfectly to receive simtools UDP data and handles disconnects and reconnects perfectly! You just need to parse what you're getting...
    • Informative Informative x 1
    • Useful Useful x 1