0

I am using hooks in ejabberd to create a custom module and have used user_send_packet hook till now.I wanted to implement a custom functionality on ejabberd server as soon as (and after) the packet is sent to the client from the server. I am thinking about using user_receive_packet hook but I am a bit confused regarding the time when it gets triggered or started.

Does it start or gets triggered just before the packet is sent to client or does it starts after the packet is sent to the client.

And in case if it starts or gets triggered before the the packet is sent, then in that case what happens to the packet being sent to the client, I mean does the packet wait for the module implementing user_receive_packet to finish and then goes to the client or it simple is not affected?

Can anyone help me out here?

4

1 回答 1

0

我正在尝试回答这个问题,以便将来可能对某人有所帮助。

在将数据包发送给用户之前user_receive_packet调用钩子。它返回(无论数据包是否已更改)或数据包被静默丢弃。(Packet,State)(drop,State)

于 2017-08-29T08:33:42.437 回答