How do I change Protocol to 1.6 in PUN 2.0

I recently changed to PUN 2.0 with self hosted server.
Here is the error message
Got a unexpected Disconnect in LoadBalancingClient
State: Disconnected.
Server: MasterServer
Trace: at Photon.Realtime.LoadBalancingClient.OnStatusChanged(StatusCode statusCode) in
C:\...\LoadBalancingClient.cs:line 2302
I searched the forum and found that changing Protocol to 1.6 would solve the problem, but the old PhotonNetwork.SwitchToProtocol(...) is no longer available. I wounder whats the new approach.


  • Hi @NanguaGames,

    Protocol 1.8 is currently not compatible with the Server SDK. According to this topic, a new version of the SDK gets prepared.

    In the meantime, you can workaround this issue by changing the client's protocol to version 1.6. If you are only using the self-hosted server, you can do this by using PhotonNetwork.NetworkingClient.LoadBalancingPeer.SerializationProtocolType = ExitGames.Client.Photon.SerializationProtocol.GpBinaryV16; before trying to connect. If you plan using the Cloud next to the self-hosted server, you would have to handle this differently depending on which option you choose: self-hosted uses Protocol 1.6 and the Cloud uses Protocol 1.8.

    One more hint: PhotonNetwork.SwitchToProtocol does not change the Serialization Protocol, it changes the Connection Protocol, which is something different.
  • @Christian_Simon:
    The Cloud happily understands clients that communicate with it using 1.6.
  • harlanharlan
    edited October 2018
    @Christian_Simon I use Photon Voice 2 with PUN2, and encounter the same problem, after
    I change the version from 1.8 to 1.6 the problem exists, the voice connection cannot be connected successfully( PUN can be successfully),we use TCP 4530 for PUN and UDP 5055 for PUN voice.This problem is very urgent and crucial for us.Please help us check it ,thank you very much.

    /// Creates a LoadBalancingClient with UDP protocol or the one specified. /// Specifies the network protocol to use for connections.
    public LoadBalancingClient(ConnectionProtocol protocol = ConnectionProtocol.Udp)
    this.LoadBalancingPeer = new LoadBalancingPeer(this, protocol);
    this.LoadBalancingPeer.SerializationProtocolType = SerializationProtocol.GpBinaryV16;//here change from 18 to 16

  • JohnTubeJohnTube mod
    edited October 2018
    Hi @harlan,

    Thank you for choosing Photon and for your patience!

    Could you try this patched Photon Voice 2 version to connect to self-hosted Photon Server?
Sign In or Register to comment.