-
StackOverflow 文档
-
xmpp 教程
-
开始使用 xmpp
-
连接和发送消息
SleekXMPP(Python)
import sleekxmpp
client = sleekxmpp.Client("address@example.net", "password")
client.connect()
client.process(blocking=False)
client.send_message(mto="remote@example.net", mbody=self.msg)
Smack(Java / Android)
XMPPTCPConnection connection = new XMPPTCPConnection("user", "password", "example.org")
connection.connect().login();
Message message = new Message("otheruser@example.net", "Hi, how are you?");
connection.sendStanza(message);
connection.disconnect();