ThreadingTCPServer, asyncore and Client-to-Client communication
Dustin
dustin at jabberdust.com
Sun Aug 8 00:15:04 EDT 2004
I've been trying to create a "byte streaming server", it's basically a
chat server, but I'd like to use it for transfering large amounts of
data between two connected clients. Sounds simple enough, but I'm
having a difficult time implementing it.
If Client #1 connects, then that thread is consumed with listening for
data from that client. If Client #2 connects, that client is on a
different thread, and therefore I don't see how I can have data sent
from Client #1 to be streamed down to Client #2. (and how can client
process #1 accept data from client #2 because it's listening to client
#1?) Obviously I'm missing something.
I've looked at asyncore/asynchat, as well as ThreadingTCPServer... but
there's something I'm missing. Is there a simple way to have an
object listen over two ports, and what comes into one port will be
sent down the another?
Any advice, or a good swift kick in the right direction would be
appreciated.
Dustin
More information about the Python-list
mailing list