Reliable Events

Hi,
I'm fairly new to photon javascript, I had previously used PUN and PUN2.
I would like to know a way by which I could make my raise on events reliable or tell me some command/function in javascript to send reliable messages, just like we use RPC in PUN.
Thanks.
Regards,
Humza Khalid

Answers

  • Hi,

    I found this function
    PhotonPeer.prototype.sendOperation
    

    which does have the sendReliable boolean as a parameter. But, if you look at the body of that function, the sendReliable is not used. Thus, I am thinking that it is not possible to send reliable messages
  • HumzaKhalid
    edited January 2020
    thanks for the reply, so I have found the class and the respective method:
    0001.png
    https://doc-api.photonengine.com/en/javascript/current/Photon.PhotonPeer.html

    you are saying this parameter does nothing and there is no other way of sending reliable messgaes ???
    can you please point out any other way possible?
    Thanks.
  • Hi,
    To send unreliable messages, client has to use UDP protocol which is not supported by javascript client. Websocket connection used in js client is always reliable.
  • @vadim , I know websocket uses TCP port but it seems some how my event's packets are getting lost and producing unnecessary issues in my game.
  • It's very unlikely that packets are getting lost and I do not have an idea how it can happen,
    Can provide a sample app which losses packets?