OnOperationRequest send message to a client for UserID

Options
Hola miembros del foro !!

Hemos puesto en marcha una operación personalizada en nuestro servidor y administrarlo en el servidor con el evento OnOperationRequest. Usamos la Aplicación LoadBalacinng en el servidor de Fotones.

¿Cómo podemos enviar un Info a otro cliente utilizando el ID de usuario?

Buscamos en la clase GameClientPeer los métodos:

Enviar datos
SendEvent
Enviar mensaje
SendOperationResponse

Y parece que envía la información al cliente de origen.

Tal vez debemos crear una instancia de un nuevo GameClientPeer y llamar a la SetupPeer antes de llamar a un método de envío?

Gracias por su tiempo, Saludos cordiales !!

Comments

  • PixelCream
    Options
    Sorry, this is the english post!! :disappointed:

    Hi forum members!!

    We have implemented a Custom Operation in our server and we manage it in the server with the OnOperationRequest event. We use the LoadBalacinng Application in the Photon Server.

    How can we send a info to a other client using the userID?

    We are searching in the GameClientPeer class the methods:

    SendData
    SendEvent
    SendMessage
    SendOperationResponse

    And it seems like send the info to the source client.

    Maybe must we instantiate a new GameClientPeer and call the SetupPeer before call a Send method?

    Thanks for your time, kind regards!!
  • chvetsov
    Options
    please take a look at this page and other adjacet to get some basic concepts and ideas

    https://doc.photonengine.com/en-us/onpremise/current/getting-started/basic-concepts
  • PixelCream
    Options
    Hi, thanks for your answer!!

    Sorry, but I believe that I have explained myself wrongly.

    We know the basic concepts and we use normally the operations and events. But now we need use a operation for send info since a client until other.

    We cant use the Events, becasuse the client didn't join to the room yet. We need send a private message like in a chat between 2 clients.

    We know the UserID, but now we need use a Operation for that reason.

    Can you understand me now?

    Regards!!
  • chvetsov
    Options
    well, neither master nor game server contain list of all connected players, so, you can not do this without modification of current code

    and there is no way to send operation from server to client. you any way should send event to client
  • PixelCream
    Options
    Thanks man!

    We got it. We was using the GameServer but the Lobby is in MasterServer. Easy for us using the MasterServer.