How to count all current peers?

edited March 2011 in Photon Server
Hi, All! :D

I wonder if someone knows how to count all current peers for collect server statistics. I apologise this info must to be in PerfmonCounters, but also I need the full list of peers, to access they propertis. Where I can get it? Or needs to make it for my self?

P.S. I know that I can run something like netstat -ano | find ":PhotonPORT" | find "ESTABLISH", but this way too log for in game statistics :)


  • Boris
    Boris ✭✭
    you will have to manage some sort of dictionary yourself - counting alone would be easier with Interlocked.Increment / Decrement.
  • All works good, any who will wont to do the same memo this small idea: for PerfmonCounters right work, you need to start up Photon server exactly for your OS architecture - 32 or 64 bits.