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 conne开发者_运维百科ction 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:)
精彩评论