EncryptionFailedToEstablish best practices

Options
tvhnet
tvhnet
edited May 2015 in DotNet
Hi,

I have several questions about StatusCode.EncryptionFailedToEstablish:

1. Which cases will client receive this status? Is it hardware-dependent or network-dependent?
2. What is the best practice to deal with it? Should I disconnect then connect and establishEncryption again?

Thanks & regards,

Comments

  • Tobias
    Options
    It should not happen at all. If so, it's likely an issue between client and server. Maybe platform dependent.
    You can try to disconnect and connect again but should make sure this causes no endless loop if it fails again.
    Do you run into this?
  • tvhnet
    Options
    Thanks Tobias,

    I just consider it for design.

    And how is about StatusCode.SendError? When does it come and how to deal with it?

    Regards,
  • Tobias
    Options
    Afaik, you should not be able to produce a SendError anymore.
    If you do, you should track how it happened and give the user the option to try again (do a fresh connect).
  • tvhnet
    Options
    I'll get SendError status if I send operation without sequential channel number. For example, the first operation is sent at channel 0 and the next one is sent at channel 10.

    Photon debug [ERROR]: Cannot send op: Selected channel (10)>= channelCount (2)
    OnPhotonStatusChanged: SendError
  • Tobias
    Options
    The channel 10 is simply not available in default case. You need to set the available channels before connecting. Set PhotonPeer.ChannelCount = 10 and you could use it.