我正在编写一个 Openfire 插件来拦截服务器在客户端空闲时发送给客户端的 Ping 消息。系统 Ping 看起来像:
<iq from='capulet.lit' to='juliet@capulet.lit/balcony' id='s2c1' type='get'>
<ping xmlns='urn:xmpp:ping'/>
</iq>
但是,当我使用 PacketInterceptor 拦截服务器和客户端之间的所有数据包时,拦截器能够拦截除 Ping 之外的所有数据包。我不明白这是怎么回事。任何帮助将非常感激!
最佳答案
在这里您可以找到一个最简单的数据包拦截器示例,它记录每个传入和传出的数据包。 http://faisalbhagat.blogspot.com/2014/03/openfire-logging-using-packetinterceptor.html
关于java - 如何拦截来自 Openfire 服务器的 Ping 消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14448978/