[Solved] UDP TCP with SendOptions.Reliability

edited June 11 in Photon Server

In the PhotonPeer class, it's been told about the SendOperation :
This method serializes and enqueues the operation right away while the actual sending happens later.

I would like to know if those waiting operations are saved on the Photon Cloud or locally until they are really sent ?
Beside, I would like to know about the RaiseEvent, the choice of Reliability = true/false means the use of TCP/UDP ?
If no, is it possible to choose between tcp/udp ? (position is sent with udp and death with tcp)


(I'm using realtime SDK only)


  • JohnTubeJohnTube mod
    edited June 11
    Hi @antigode,

    The client keeps a buffer of commands (including operations requests) locally before sending them in batch.
    TCP is always reliable by design.
    Photon adds an optional reliability layer on top of UDP which can be enabled on demand by command (request/event).
  • Thank you for your help ! If i understand well, if i use raiseEvent it will always be UDP ? (with reliability layer or not). So i can't send throught TCP ?
  • Hi @antigode,

    You can choose the transport protocol before connecting.
    See PhotonServerSettings.
    RaiseEvent, like other operations requests, can be sent via TCP or UDP.
  • when i type PhotonServerSettings on google all i have is for PUN2 while i'm on realtime sdk, even in my folders i can't find this file. So this is impossible in a game, to send the death with tcp and the position with udp ? (Just to be very clear ^^')
  • JohnTubeJohnTube mod
    edited June 11
    Hi @antigode,

    You can't mix protocols.
    Once you connect you stick with the chosen protocol.

    to set the protocol in Photon Realtime's C# Client SDK (default is UDP), specifiy it in the constructor:

    LoadBalancingClient loadBalancingClient = new LoadBalancingClient(protocol);
  • ok thank you a lot !
Sign In or Register to comment.