2 Replies Latest reply on Oct 1, 2012 11:22 AM by BrianatArena

    Communicate between two desktops

    BrianatArena Level 1

      Can anyone lead me to a resource, or briefly describe the process, to address the scenerio below:


      I have two Windows computers on a LAN. I need to develop an application  for each computer that (when both computers are runing the application) allows communication between the two machines. For example: pressing a button within the application on one computer would execute a function in the application of the other computer). I am comfortable building stand-alone air apps and web-based PHP/MySQL apps with Flash/Air/Dreamweaver; however, I don't know where to start when creating a connection between two computers. Any suggestions? Thanks!

        • 1. Re: Communicate between two desktops
          adobe_paul Adobe Employee

          I've worked on several projects where we did this. We used a "client/server" architecture where one of the AIR apps acts as the "server" (conceptually it's the same as a web server) and the other AIR app is the "client" that connects to the server the way a web browser would talk to a web server.


          For your "client" use the Socket class.


          For your "server" use the ServerSocket class.



          Alternatively, we also used UDP sometimes, so we'd use the DatagramSocket class on both sides (both act as "sender/receiver"). However, my recollection is that we ended up moving away from UDP since it's unreliable (by design) and switched to using TCP sockets (Socket/ServerSocket).

          1 person found this helpful
          • 2. Re: Communicate between two desktops
            BrianatArena Level 1

            Thanks for the suggestion, I will look into the Socket/ServerSocket classes and see if I can come up with some solutions.