Hi adobians !
I am working on RTMFP protocol and my application is just a 1-1 simple chat.
When i open the application , after the netconnection success event , i get the nearID and keep waiting for the chat partner.
Now i open the same application on another tab and i get a different nearID.
So what i do is exchange those ids between 2 apps manually (as u all know) and the two streams are now connected to each other.
Let the call them as User A and User B.
All the messages are successfully exchanged using the NetStream.send() method between 2 users.
User A: Hi
Now User A want to disconnect User B and connect to him (User B) again. I use this code to disconnect User B from User A
var nsPeer:NetStream = ns.peerStreams; //peerStreams since there is only 1 stream connected nsPeer.close();
This successfully disconnects the UserB when this is called from User A disconnect button.
Now the main problem is .... When i connect the streams again the I GET THE CHAT MESSAGE FROM UserB TWICE !
User A:I am back
(I guess UserB is still holding UserA's old stream)
Is it possible to disconnect the stream from UserB simultaneously when UserA calls disconnect first ?