ApplicationBase.BroadCastEvent<TPeer>()

Options
mindlube
edited June 2012 in Photon Server
Does this method send the event on each peer's requestFiber? Or does it do it all on the current fiber? Just curious if it's a trade-off of efficiency. I see it says "This method serializes the data just once per protocol instead of once per peer."

Comments

  • BenStahl
    Options
    Like all send methods on peers this method also does not use a fiber.
    If you use the SendEvent method of the PeerBase implementation send an event to mote than one peer than the event will be serialized once for each peer.
    So it's more efficienct to use the BoradCastEvent method, because if for example all peers using the some protocol the serialization will only be done once and then the serialized data will send to each peer.
  • Ben, OK thanks for your reply. So in other words, these Send* and BroadCastEvent methods don't use a fiber because rather using the current .NET fiber, they are executing on the native code part of Photon? The Photon core or "kernel", is how I'm thinking of it.
  • Tobias
    Options
    Exactly, the core handles the threading for outgoing data.