Smack 3.3.1 发布,Java 的 XMPP 开发包

时间:2023-03-08 23:19:34
Smack 3.3.1 发布,Java 的 XMPP 开发包

Smack 3.3.1 发布了,这是一个小更新版本,主要更新包括:

  • [SMACK-441] - Memory leak in KeepAliveManager
  • [SMACK-447] - Compression is not enabled for Java7ZlibInputOutputStream
  • [SMACK-448] - Java7ZlibInputOutputStream does not work. Deflater.DEFAULT_STRATEGY is used as compression level when it should use Deflater.DEFAULT_COMPRESSION
  • [SMACK-450] - VCard.load() throws null pointer exception if there is no VCard for the user
  • [SMACK-455] - Multiple items doesn`t not parse correctly in a pubsub message
  • [SMACK-369] - Exceptions during login should get thrown back up to the caller.

Smack是一个开源,易于使用的XMPP(jabber)的 Java 客户端类库。

示例代码:

1 // Create a connection to the jabber.org server.
2 Connection conn1 = new XMPPConnection("jabber.org");
3 conn1.connect();
4  
5 // Create a connection to the jabber.org server on a specific port.
6 ConnectionConfiguration config = new ConnectionConfiguration("jabber.org", 5222);
7 Connection conn2 = new XMPPConnection(config);
8 conn2.connect();