From: Bill Kelly Date: 2007-11-25T02:34:42+09:00 Subject: Re: Obtaining ip address of client socket in ruby From: "Robert Klemme" > 2007/11/24, Victor Rosillo : >> How can I obtain the ip address of the originating (client) socket , >> in a server/client socket ruby program? >> >> What ruby library is fitted with a class/ method to do this? >> How can it be done using ruby? >> >> I would appreciate some sample code. > > http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_network.html sock_domain, remote_port, remote_hostname, remote_ip = socket.peeraddr # note: sock_domain is the address family, e.g. "AF_INET" Regards, Bill