Merge branch 'master' into develop
This commit is contained in:
commit
a00eee1bbe
@ -85,7 +85,7 @@ class IBBReceiver(sleekxmpp.ClientXMPP):
|
|||||||
def stream_opened(self, stream):
|
def stream_opened(self, stream):
|
||||||
# NOTE: IBB streams are bi-directional, so the original sender is
|
# NOTE: IBB streams are bi-directional, so the original sender is
|
||||||
# now the opened stream's receiver.
|
# now the opened stream's receiver.
|
||||||
print('Stream opened: %s from ' % (stream.sid, stream.receiver))
|
print('Stream opened: %s from %s' % (stream.sid, stream.receiver))
|
||||||
|
|
||||||
# You could run a loop reading from the stream using stream.recv(),
|
# You could run a loop reading from the stream using stream.recv(),
|
||||||
# or use the ibb_stream_data event.
|
# or use the ibb_stream_data event.
|
||||||
|
@ -14,7 +14,7 @@ def to_b64(data):
|
|||||||
|
|
||||||
|
|
||||||
def from_b64(data):
|
def from_b64(data):
|
||||||
return bytes(base64.b64decode(bytes(data))).decode('utf-8')
|
return bytes(base64.b64decode(bytes(data)))
|
||||||
|
|
||||||
|
|
||||||
class Open(ElementBase):
|
class Open(ElementBase):
|
||||||
|
@ -174,7 +174,7 @@ class TestInBandByteStreams(SleekTest):
|
|||||||
to="tester@localhost/receiver" />
|
to="tester@localhost/receiver" />
|
||||||
""")
|
""")
|
||||||
|
|
||||||
self.assertEqual(data, ['it works!'])
|
self.assertEqual(data, [b'it works!'])
|
||||||
|
|
||||||
|
|
||||||
suite = unittest.TestLoader().loadTestsFromTestCase(TestInBandByteStreams)
|
suite = unittest.TestLoader().loadTestsFromTestCase(TestInBandByteStreams)
|
||||||
|
Loading…
Reference in New Issue
Block a user