2

I have a publisher who publishes a netstream using stratus p2p. This is then connected to by player who subscribes to the netstream.

I believe one can reject the subscriber when the stream tries to connect by using the onPeerConnect method of the netstream's client. However, I would like to boot the subscriber after they have been connected.

There are potentially other subscribers to that netstream so I cannot just close it. How would I boot a particular subscriber without closing the published netstream?

cammil
  • 9,499
  • 15
  • 55
  • 89

1 Answers1

2

The peerStreams property of your publishing NetStream is an array of NetStraems of all subscribers. You can iterate through it and do something like netStream.peerStreams[0].close();

valentin
  • 511
  • 3
  • 16