[Twisted-Python] Twisted lineReceived (sender)
teratorn at twistedmatrix.com
Sat Jan 13 15:15:07 MST 2007
On Sat, 13 Jan 2007 13:04:23 -0600, Lee Connell <lee.a.connell at gmail.com>
> 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.
More information about the Twisted-Python