Is socket.io emit callback appropriate?

后端 未结 1 1142
醉话见心
醉话见心 2021-01-31 02:12

Recently I have been messing around with socket.io and found this interesting thing, that I can have emit function callback like this.

I start emitting on client side li

相关标签:
1条回答
  • 2021-01-31 02:51

    It's perfectly legal.

    Those callbacks are called 'acknowledgement functions' and are summarily mentioned in the Wiki and described a bit more in detail on the NPM page ('Getting acknowledgements').

    EDIT: more recent documentation can be found here.

    0 讨论(0)
提交回复
热议问题