Anyone know how to get a remote IP address of the connection? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/eventmachine-talk/attachments/20070228/bd5e0754/attachment.html
EventMachine::Connection#get_peername On 2/28/07, Daniel Aquino <mr.danielaquino at gmail.com> wrote:> > Anyone know how to get a remote IP address of the connection? > > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >-- Tony Arcieri ClickCaster, Inc. tony at clickcaster.com (970) 232-4208 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/eventmachine-talk/attachments/20070228/3e84c21b/attachment-0001.html
Hey Tony, I seem to be getting mangled data when I try to access self.get_peername I''m attempting this in EventMachine::Connection#post_init On 2/28/07, Tony Arcieri <tony at clickcaster.com> wrote:> > EventMachine::Connection#get_peername > > On 2/28/07, Daniel Aquino <mr.danielaquino at gmail.com> wrote: > > > > Anyone know how to get a remote IP address of the connection? > > > > _______________________________________________ > > Eventmachine-talk mailing list > > Eventmachine-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/eventmachine-talk > > > > > > -- > Tony Arcieri > ClickCaster, Inc. > tony at clickcaster.com > (970) 232-4208 > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/eventmachine-talk/attachments/20070228/83969cf3/attachment.html
If anyone wants to know, This is how you get the remote ip/port of the connection port, ip = Socket.unpack_sockaddr_in(connection.get_peername) # extract the address information On 2/28/07, Daniel Aquino <mr.danielaquino at gmail.com> wrote:> > Hey Tony, > > I seem to be getting mangled data when I try to access self.get_peername > I''m attempting this in EventMachine::Connection#post_init > > On 2/28/07, Tony Arcieri <tony at clickcaster.com> wrote: > > > > EventMachine::Connection#get_peername > > > > On 2/28/07, Daniel Aquino < mr.danielaquino at gmail.com> wrote: > > > > > > Anyone know how to get a remote IP address of the connection? > > > > > > _______________________________________________ > > > Eventmachine-talk mailing list > > > Eventmachine-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/eventmachine-talk > > > > > > > > > > > -- > > Tony Arcieri > > ClickCaster, Inc. > > tony at clickcaster.com > > (970) 232-4208 > > _______________________________________________ > > Eventmachine-talk mailing list > > Eventmachine-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/eventmachine-talk > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/eventmachine-talk/attachments/20070301/61f6f939/attachment.html