Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
ip address of client from GServer#serve
Julien Biard
1/19/2009 2:09:00 PM
Hi,
I would like to know if there is a way to take the ip address of client
from GServer#serve.
Regards,
Julien
2 Answers
Brian Candler
1/19/2009 2:43:00 PM
0
Julien Biard wrote:
> I would like to know if there is a way to take the ip address of client
> from GServer#serve.
Try this:
def serve(myClient)
p myClient.peeraddr
end
--
Posted via
http://www.ruby-...
.
Julien Biard
1/19/2009 3:00:00 PM
0
[Note: parts of this message were removed to make it a legal post.]
thanks, it works.
I should have considered the GServer#serve parameter as a socket and not
just as an io (cf
http://www.ruby-doc.org/core/classes/GS...
).
On Mon, Jan 19, 2009 at 3:43 PM, Brian Candler <b.candler@pobox.com> wrote:
> Julien Biard wrote:
> > I would like to know if there is a way to take the ip address of client
> > from GServer#serve.
>
> Try this:
>
> def serve(myClient)
> p myClient.peeraddr
> end
> --
> Posted via
http://www.ruby-...
.
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
ip address of client from GServer#serve
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password