Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 557719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:03:23+00:00 2026-05-13T12:03:23+00:00

I am learning Twisted, especially its XMPP side. I am writing a Jabber client

  • 0

I am learning Twisted, especially its XMPP side. I am writing a Jabber client which must send and recieve messages. Here is my code: http://pastebin.com/m71225776
As I understood the workflow is like this:
1. I create handlers for important network events (i.e. connecting, message recieving, disconnecting, etc)
2. I run reactor. At this moment starts the loop which is waiting for any event. When event happens it is passed to specified handler.
The problem is in sending messages. Sending is not associated with any network event so I can’t create handler for it. Also I can’t do anything with reactor until its loop stops working. But the goal is “To send messages when I need and recieve data when it comes”.
I think am not fully understand philosophy of twisted, so give me a right way please.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:03:23+00:00Added an answer on May 13, 2026 at 12:03 pm

    You just need to find what events will trigger sending a message.

    For example, in a GUI client, sending happens when the user types something. You should integrate with a graphics toolkit, using the Twisted reactor for its mainloop (there’s a Gtk+ Twisted reactor for example). Then you’ll be able to listen for some interface events, like the user typing enter in a text area; and you’ll be able to react to that event by sending a message.

    Other sources of events could be Twisted timers, any kind of protocol, including IPC, webhooks…

    Incidentally, if you need a higher-level library for XMPP with Twisted, have a look at Wokkel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For learning and demonstrating, I need a macro which prints its parameter and evaluates
Learning client side code of an existing site, would like to understand some activity
I am working my way through learning Twisted, and have stumbled across something I'm
I am trying to start learning twisted for socket servers creation. I want to
I am learning network programming using twisted 10 in python. In below code is
As a learning exercise, I'm writing a Python program to connect to a channel
So I'm writing yet another Twisted based daemon. It'll have an xmlrpc interface as
Still learning JSP Web Applications here. I have been doing this for a while
I am learning on my own about writing an interpreter for a programming language,
How do I begin learning Twisted? What books, documentation or tutorial do you guys

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.