如何使用此方法通过 xmpppy 发送数据:http://xmpp.org/extensions/xep-0047.html#send
我想我应该使用 IBB 类,但不知道该怎么做。 http://xmpppy.sourceforge.net/apidocs/
请您参考如下方法:
首先,如果您使用的是 GoogleTalk,请确保发件人在收件人名单上。接下来,在发送方:
from xmpp import *
cl=Client('example.com')
cl.connect()
cl.auth('sender', 'sender_pass')
ibb = filetransfer.IBB()
ibb.PlugIn(cl)
f = open('/tmp/foo')
ibb.OpenStream('123', 'receiver@example.com/resource', f)
