Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

UDP Support?

I've been trying to determine whether or not Titanium supports - or will, or when it will support - UDP type packets/sockets.

Does anyone know if this is currently possible?

— asked April 12th 2010 by Brendon Kozlowski
  • sockets
  • udp
1 Comment
  • I am interested in the creation of an UDP socket for a desktop app. Does anyone know if this feature will be supported in the future? Thanks a million

    — commented March 29th 2011 by Fabrizio Fortino

8 Answers

  • Thanks Doug. I've created a simple module for sending udp via ios at http://github.com/chrisfjones/titanium-module-udp
    At present, its a naive implementation but it works for my purposes so far. Feel free to use it or to help out until Appcelerator adds udp support to Titanium core.

    — answered October 9th 2011 by chris jones
    permalink
    1 Comment
    • I already rolled my own which suits my needs, but since it was for a client I can't post the code. Hopefully yours will help fill the gap for others until UDP gets added to Titanium.

      — commented October 9th 2011 by Doug Handy
  • There is a UDP module in the public modules repository now. It supports both iOS and Android, and lets you send packets to specific addresses or broadcast them out. You can also receive packets, and read their data as strings or as a byte array. This was created in the last several weeks, so please bear with any issues mass use uncovers! Feel free to send in pull requests for any fixes or enhancements you want to make to the module. Cheers!

    https://github.com/appcelerator/titanium_modules

    (Note: If you are using Android with Ti SDK 1.7.5 or earlier, you will need to use the apilevel_1 branch of the above repository! The master branch is for 1.8.0.1 with dual runtime (V8 and Rhino) support.)

    — answered December 21st 2011 by Dawson Toth
    permalink
    0 Comments
  • I would like to know this as well.

    I mainly just want to send and receive UDP broadcast packets.

    — answered May 6th 2010 by Angus Peart
    permalink
    0 Comments
  • Can we get an update from a Titanium employee on when UDP would be supported? I'm looking to build a mobile app that reports on where the vehicle is currently located, and the messages need to be sent via UDP.

    — answered November 18th 2010 by Justin Toth
    permalink
    0 Comments
  • +1,
    I need udp (both bind and connect) as well

    — answered October 5th 2011 by chris jones
    permalink
    0 Comments
  • If you need UDP support now, you need to create your own module to do that. That is what I did when I needed the ability to send broadcast UDP datagrams from iOS. My need was very specific so I created only a very small and focused module that is not generic. And I couldn't post it anyway because it was created for client who has rights.

    But neither is it all that complicated to roll your own.

    The nice thing about Titanium is you never had to hit an absolute brick wall. When it can't do something, you can extend it via modules.

    — answered October 5th 2011 by Doug Handy
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.