[Twisted-Python] How could I distinguish each TCP connection?
jarrod.roberson at gmail.com
Wed Jun 22 01:19:57 EDT 2005
On 6/21/05, Eric Hsu <nkeric at gmail.com> wrote:
> 2005/6/21, Christopher Armstrong <radeex at gmail.com>:
> > You can do it based on the Protocol instance. For TCP, there is one
> > Protocol instance per connection, and it has access to the transport.
> Hi Christopher!
> Big thanks first!
> When I writing codes like the following to provide TCP/UDP services:
> factory = Factory()
> factory.protocol = MyTCPService
> reactor.listenTCP(port1, factory)
> reactor.listenUDP(port2, MyUDPService())
> How could I get the protocol instance of each client and maintain them?
> Please tell me more details if you could, since I'm very very new to
> twisted :)
> - Eric
> Read the documentation first, it is all there in the HOW-TOs and
If you don't know what you want, you probably need a nap.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python