Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26195

Parity: Ti.Network.Socket.UDP API differs significantly from Ti.Network.Socket.TCP API

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android, TiAPI, Windows
    • Labels:
    • Story Points:
      21

      Description

      The Ti.Network.Socket.TCP and Ti.Network.Socket.UDP APIs should be as similar as we can possibly achieve. However they differ significantly at the most basic levels.

      Specifically:

      • TCP uses properties to set host/port then calls #listen() and #accept(), UDP uses #start(port, [host]) for starting a local socket
      • TCP uses #close(), UDP uses #stop() to tear down the socket
      • TCP uses properties to set host/port then calls #connect(), it's unclear to me how UDP handles connecting/sending data to a remote socket as a client.
      • TCP has callbacks for accepted/connected (server got a connection, connected as a client); UDP has started/data (socket bound, socket received data).
      • The properties/callbacks differ in naming of common properties, i.e. port is the same, but TCP uses host while UDP uses address.
      • TCP forces you to use IOStream read/write methods (using Ti.Buffer); UDP has special methods for writing bytes (as Number[]) and Strings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cwilliams Christopher Williams
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-6450
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration