[wxPython] UDP/TCP socket IO and mainloop

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] UDP/TCP socket IO and mainloop

Stuart Stanley

Folks,

I was _sure_ this had zipped by the list at one time, but I can't seem to
find it in the archives, so my apologies if this is old ground.

I am writing a dynamic routing agent simlulator (BGP peer, OSPF/ISIS
adjecenies, etc).  I would like my wx GUI to be up showing the status, etc,
etc, and then respond to incoming packets on either BGP peering sessions
(TCP), or ISIS (or OSPF) traffic (CLNS and UDP respectivily).  Anyone
know a good way to do this?  

Danke!


 "I know you're supposed to take life one day at a | Stuart Stanley
 time -- but lately several days have attacked me  | [hidden email]
 at once."                                         | Lucent Technologies,
                                                   | Eden Prairie, MN
                                                   | 612.996.6829



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] UDP/TCP socket IO and mainloop

Robin Dunn
>
> I am writing a dynamic routing agent simlulator (BGP peer, OSPF/ISIS
> adjecenies, etc).  I would like my wx GUI to be up showing the status, etc,
> etc, and then respond to incoming packets on either BGP peering sessions
> (TCP), or ISIS (or OSPF) traffic (CLNS and UDP respectivily).  Anyone
> know a good way to do this?
>

Have your packet monitors and responders running in separate threads from the
GUI.  When they need to update the GUI they should send an event (possibly a
custom event class) to the appropriate window with wxPostEvent().  See
demo/Threads.py for an example.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users