擅长:python、mysql、java
<p>首先,如果你在GoogleTalk上,确保发送者在接收者的名单上。接下来,在发送方:</p>
<pre><code>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)
</code></pre>
<p>如果您没有首先正确地执行<a href="http://xmpp.org/extensions/xep-0095.html" rel="nofollow">XEP-95</a>/<a href="http://xmpp.org/extensions/xep-0096.html" rel="nofollow">XEP-96</a>,那么流ID是什么并不重要。在</p>