asyncore and GUI (wxPython)

Z

Zunbeltz Izaola

Hi,

I have the followin situation.

1) I've a machine controled by a computer programn that can
comunicate with TCP/IP ("server")to recive the request of other
program to knwo what the machine should do.
2) The other program ("client") has a GUI (with wxPython), recives
data from the machine and should process it (draw and write to file).

In the current situation the comunication is done in a thread. Every
time data is collected it is pased to the main thread of the GUI, with
a wxPostEvent. Every stream_socketk sended by the client has its
correspondig answer from the server. (I log the comunication an
every received socket is the anser of the sended one)

The problem: when i stop the thread (i don't no why) the answer to
the last socket don't correspond to the last sended (they mix).


The possible correction? I have been told not to do network connection
in other thread, instead i should use asyncore. I'll be sending sockets
every 0.1 seconds or faster. Will be the main progam "freeze" in the
asyncore loop, or it will refresh the windows and response to
mouse/keyboard properly? How fast can i be sending sockets without
distourbing the main program; or (it is very likeyly) i am totaly wrong
and i should take another way?

Thanks in advance

Zunbeltz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top