xmpp 连接和发送消息
例子
SleekXMPP (Python)
import sleekxmppclient = 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();
以上是 xmpp 连接和发送消息 的全部内容, 来源链接: utcz.com/z/338730.html