Why addResponseListener callback not work?

It's right to get response data in ResponseListener's callback function ? Or I think wrong ?

here is my code :
const addListener = (client) => {
    client.addResponseListener(CODE,(e) => { console.log('addResponseListener callback',e.data) } );
}
But nothing in console QAQ

Comments

  • It just only sendOperation now.
    I have no idea about how to get response data. :'(
    Could someone give me a hand please ~
  • I found the anwser :#
  • Hi @ytk,

    Thank you for choosing Photon!

    Please share the solution with us so others can benefit from it.
  • ytk said:

    I found the anwser :#

    Hi, kindly share the solution with us so that we can also benefit from it :smile:
  • vadimvadim ✭✭✭
    edited March 23
    addResponseListener is a part of PhoonPeer api. While having realtiime and chat apis based on it, you hardly need to use PhoonPeer api directly.

    Probably the reason was that instead of registering callback, the code assigns function which registers callback to constant. No call actually done.
Sign In or Register to comment.