python - wxPython threaded UDP server -


I am trying to keep an UDP server together with a wdpython GUI.

Here is a link:

I've added it as pretty I have successfully found a thread running UDP server, but I did not know how to stop the socket while blocking the thread.

At this time every time you click, a new thread will be kick but I will delete it. Is it possible to stop the socket from walking when the thread is closed?

If I am doing this completely wrong then any advice is appreciated.

Cheers

> EEF

use of Python Twisted Make it a wxPython integration with twisted.internet.wxreactor and makes networking easy and threadless. Twisted.internet.protocol import from twisted.internet import

  from import wxreactor. ): DIF datagram received (self, data, (host, port)): "% r:% d" derived from% s (data, host, port) self.transport.write (data, (host, port) ) # & Lt; GUI code & gt; # To stop port = reactor To start #Listin UDP (& lt; port & gt; MyProtocol ()), stop # Myport_stopport_stopening () MyProtocol # or in the port. Stop listing (.post listings) twisted.internet Import from reactor reactor outside. RegisterWxApp (app) reactor.ron ()  

Comments