From 6175cbcd99f917b08646d130770a132458056249 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 16 Aug 2014 22:37:29 +0200 Subject: Reintroduce XMLStream.process, making it run the asyncio event loop. --- examples/ibb_transfer/ibb_receiver.py | 14 ++------------ examples/ibb_transfer/ibb_sender.py | 14 ++------------ 2 files changed, 4 insertions(+), 24 deletions(-) (limited to 'examples/ibb_transfer') diff --git a/examples/ibb_transfer/ibb_receiver.py b/examples/ibb_transfer/ibb_receiver.py index d24e5003..02c899eb 100755 --- a/examples/ibb_transfer/ibb_receiver.py +++ b/examples/ibb_transfer/ibb_receiver.py @@ -122,15 +122,5 @@ if __name__ == '__main__': # xmpp.ca_certs = "path/to/ca/cert" # Connect to the XMPP server and start processing XMPP stanzas. - if xmpp.connect(): - # If you do not have the dnspython library installed, you will need - # to manually specify the name of the server if it does not match - # the one in the JID. For example, to use Google Talk you would - # need to use: - # - # if xmpp.connect(('talk.google.com', 5222)): - # ... - xmpp.process(block=True) - print("Done") - else: - print("Unable to connect.") + xmpp.connect() + xmpp.process() diff --git a/examples/ibb_transfer/ibb_sender.py b/examples/ibb_transfer/ibb_sender.py index 2d88d4ce..f5e44fb7 100755 --- a/examples/ibb_transfer/ibb_sender.py +++ b/examples/ibb_transfer/ibb_sender.py @@ -120,15 +120,5 @@ if __name__ == '__main__': # xmpp.ca_certs = "path/to/ca/cert" # Connect to the XMPP server and start processing XMPP stanzas. - if xmpp.connect(): - # If you do not have the dnspython library installed, you will need - # to manually specify the name of the server if it does not match - # the one in the JID. For example, to use Google Talk you would - # need to use: - # - # if xmpp.connect(('talk.google.com', 5222)): - # ... - xmpp.process(block=True) - print("Done") - else: - print("Unable to connect.") + xmpp.connect() + xmpp.process() -- cgit v1.2.3