简体   繁体   中英

Flash XMLSocket & NetStream interfere with each other

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) using Cirrus, 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?

This is very curious behavior. Could you extract and post some code here?

This should work...

  • open XML socket to server (XMLSocket)
  • sendStream (NetStream + direct connections)
  • recvStream (NetStream + peerId)

Can you create new clean project and separate just the code that cause this and see if it stills happens.

And you could try this with Release build in non-debugger Flash Player also.

(I do this before I go for help and half the time I don't even ask:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM