On Wed, Feb 10, 2010 at 5:36 PM, Jean-Michel Pichavant <span dir="ltr"><<a href="mailto:jeanmichel@sequans.com">jeanmichel@sequans.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">I don't know exactly what you are trying to do, but if your server requires informations from the client, it would be better to ask explicitly the client for those informations.</div></div>


For instance, if a method requires te client IP address, then the IP address is definitely a parameter of the method.<br></blockquote><div><br></div><div>I can't answer the OP, as I don't know the answer to his specific question-- but er, asking a client to provide one's IP address is not really a very workable solution. There's no way to really determine your own IP address in a reliable way.</div>

<div><br></div><div>All the usual methods (e.g., socket.gethostbyname(socket.gethostname())) can fail and/or be wrong in some not terribly uncommon situations. The only reliable way to get such a piece of information is to connect to a server, and ask that server what address you were connecting to them as. Even then, that IP may not be the same as an IP you use to connect to say, a different server (on a different network)</div>

<div><br></div><div>--S</div></div>