[Twisted-Python] Twisted lineReceived (sender)

Lee Connell lee.a.connell at gmail.com
Sat Jan 13 17:44:58 EST 2007


Agh yes, should have thought of that!

Thank you.

-----Original Message-----
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com] On Behalf Of Eric Mangold
Sent: Saturday, January 13, 2007 5:15 PM
To: Twisted general discussion
Subject: Re: [Twisted-Python] Twisted lineReceived (sender)

On Sat, 13 Jan 2007 13:04:23 -0600, Lee Connell <lee.a.connell at gmail.com>  
wrote:

> Thanks,
>
> getPeer() works for ip and port, however it wouldn't work in my case,
> because I want to determine one client from another, if multiple clients
> were coming from the same address this would fail.

On the contrary, the combination of source IP and source port will be  
unique to each TCP connection, even coming from NAT devices.

> Loop through the factory.clients first and...
>
> I just compared "if client != self:" send the message

Yeah, if all you care about is differentiation then that works.

-- 
Eric Mangold
Twisted/Win32 Co-Maintainer

_______________________________________________
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.10/624 - Release Date: 1/12/2007
2:04 PM
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.10/624 - Release Date: 1/12/2007
2:04 PM
 





More information about the Twisted-Python mailing list