1 Reply Latest reply on Mar 13, 2011 2:41 PM by Michael Thornburgh

    XMLSocket & Cirrus

    greengnu Level 1

      in my test application, i have an XMLSocket to communicate with a java socket server (running locally on my computer).

       

      If i concurrently try to setup a P2P connection with another client (also running locally on my computer) then on

       

      private function initRecvStream(){

           recvStream = new NetStream(nc, farPeerID);

           recvStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

           recvStream.play("media");

       

           recvStream.client = this;

      }

       

      then the client reconnects to the socket server (the socketserver receives a new connection, without receiving a disconnect before)

       

      this happens only when initializing the receiveStream. initializing the sendStream doesn't interfere with the connection to the socket server.

       

       

       

      What's the problem here? why does my p2p connection interfere with my XMLSocket connection to my socket server?

        • 1. Re: XMLSocket & Cirrus
          Michael Thornburgh Adobe Employee

          i can only guess at the other logic and code pathways in your application. so, guessing at possible causes:

           

            1) perhaps your XMLSocket is being garbage collected (is there a strong reference to it that traces to a reference root?).  this seems unlikely if you're not getting a disconnect at the server, but instead a second connect.

           

            2) perhaps something is causing the code that opens the XMLSocket to be called again.  perhaps related to events that might be dispatched against recvStream in your netStatusHandler function, or perhaps related to whatever calls initRecvStream().