S
S
snegirev_news2018-02-16 14:58:09
Python
snegirev_news, 2018-02-16 14:58:09

Twisted: how to send a message when some event occurs in the GUI?

What is now implemented is that the client connects to other clients known to him, "greets them", exchange peers and then just listen.
And there is a GUI application that will later dock with Twisted. So, how can I make it so that when an event occurs in the GUI, I notify other clients about this event?
Do I understand correctly that from the GUI of the application I need to somehow call a method that sends messages in the Protocol class?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-02-16
@snegirev_news

The most correct option is to make a specific request to the twisted server in the event handler of the GUI application, in response to which the server will send notifications to active connections.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question