<br><br><div class="gmail_quote">On Tue, Jan 13, 2009 at 3:42 PM, Jean-Paul Calderone <span dir="ltr"><<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Tue, 13 Jan 2009 15:34:19 +0100, Alessio Pace <<a href="mailto:alessio.pace@gmail.com" target="_blank">alessio.pace@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I'm having some difficulties in trying to figure out how to get a reference<br>
to the connector or anyway the local port to which a client socket is bound<br>
in a reactor.connectTCP() call, where the bindAddress is not passed as<br>
parameter, thus letting the OS pick an available port.<br>
<br>
In fact in the ClientFactory has a buildProtocol(self, addr) method, but<br>
'addr' is the address of the remote endpoint of the client socket created..<br>
<br>
Thanks in advance for any suggestion.<br>
</blockquote>
<br></div></div>
The protocol gets connected to a transport with a `getHost´ method which<br>
returns an IPv4Address object with `host´ and `port´ attributes. You<br>
can't get this information from the connector, since the connector exists<br>
for longer than a single connection.</blockquote><div><br>Thanks a lot, this perfectly replies to my question. I should have looked a bit more in the sources :-)<br><br>Regards,<br>Alessio Pace.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>