Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-15 Thread zxo102
"That twisted example only accepts one client connection" if only one port is available. zxo102 写道: > Bryan, >Thanks for your note. Finally, I have made "one listener socket for > all the connections" work plus Queue-communication between the threads > in wxpython Gui and the threads for s

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-15 Thread zxo102
Bryan, Thanks for your note. Finally, I have made "one listener socket for all the connections" work plus Queue-communication between the threads in wxpython Gui and the threads for socket connections. Trying to make that twisted example code in this topic for "one listener socket-all the co

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-13 Thread Jean-Paul Calderone
On 12 Aug 2006 21:59:20 -0700, zxo102 <[EMAIL PROTECTED]> wrote: >Jean-Paul, >I just start to learn Twisted. Here is my simple case: I can find >the data sent by clients in dataReceived but I don't know which >client/which port the data is from. After I know where the data comes >from, I can do

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread Bryan Olson
zxo102 wrote: >I am doing a small project using socket server and thread in python. > This is first time for me to use socket and thread things. >Here is my case. I have 20 socket clients. Each client send a set > of sensor data per second to a socket server. The socket server will > do

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread zxo102
Jean-Paul, I just start to learn Twisted. Here is my simple case: I can find the data sent by clients in dataReceived but I don't know which client/which port the data is from. After I know where the data comes from, I can do different things there, for example, write them into different files

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread Jean-Paul Calderone
On 12 Aug 2006 10:44:29 -0700, zxo102 <[EMAIL PROTECTED]> wrote: >Jean-Paul, >Thanks a lot. The code is working. The python twisted is new to me too. >Here are my three more questions: >1. Since the code need to be started in a wxpyhon GUI (either by >clicking a button or up with the GUI), do I ha

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread zxo102
Jean-Paul, Thanks a lot. The code is working. The python twisted is new to me too. Here are my three more questions: 1. Since the code need to be started in a wxpyhon GUI (either by clicking a button or up with the GUI), do I have to run the code in a thread (sorry, I have not tried it yet)? 2. Ho

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread Jean-Paul Calderone
On 12 Aug 2006 09:00:02 -0700, zxo102 <[EMAIL PROTECTED]> wrote: >Hi, > I am doing a small project using socket server and thread in python. > This is first time for me to use socket and thread things. > Here is my case. I have 20 socket clients. Each client send a set >of sensor data per seco

start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread zxo102
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a set of sensor data per second to a socket server. The socket server will do two things: 1. write