client - client connection & Flush func.

Hello! I have two questions:

1- I'm sending a data to server but how do I send it to other clients from server. I'm currently doing this with having a list of clients in my server code. Is this the right way?

2- What is Flush function? Where can it be used?

Thanks =)

Comments

  • So, you are working with the Server SDK? Just got to ask, cause you post in the Photon Unity Networking forum, which is rarely combined with custom logic.
    Just asking :)

    You call Operations on the server and send Events to the clients. The room class offers a list if actors in it, so you can easily send events to all players that are in the room. It's not supported to send events to everyone (connected) and you would have to build a list for that, if you wanted to.

    Flush function is used to speed up actual sending of events to the clients (flush internal queues to UDP packages). It's not needed unless you know you have to speed up a particular message.
  • thanks and sorry by the way=) I was just looking this forum and I forgot where I am=)
Sign In or Register to comment.