1 Reply Latest reply on Apr 29, 2011 9:05 AM by phiphou

    Dealing with netConnection in Commands (for FMS,red5, etc..)

    phiphou Level 1

      Hi all,

       

      I'm learning the new Cainrgorm and I succeed in understanding remote object and httpService call in Commands.

       

      But how can I deal with netConnection ? NetConnection.connect() does not return an asynctoken.

       

      Do I have to make my own service component, with asynctoken support and declare it in my context, like with httpService ?

       

      Maybe Commands are not the good place to communicate with FMS ? What about tasks ?

       

      I really spent many hours searching for someone having facing the same problem, but without success...

       

      I think I don't really understand the AsyncToken concept... I tried to make my "execute" method to return an asynctoken objet, but my CommandResult method is never called...

       

      Can you help me ?

       

      And please consider I'm french, so I don't master english, so please be simple in your answer...

       

      Thanks

        • 1. Re: Dealing with netConnection in Commands (for FMS,red5, etc..)
          phiphou Level 1

          I found it !

           

          I took the time reading all the parsley documentation, and understood what to do. I need to deal with commandTasks, not commands !

           

          So, adding <spicefactory:TaskCommandSupport/> in my context builder, and deal with a class that extends the org.spicefactory.lib.task.Task class. And that's it !

           

          So, I really recommand you to read all the documentation, you'll find golden nuts in it !