[Mongrel] [Patch] HttpServer.port reports the bound port
steven at lumos.us
Mon Aug 6 17:42:01 EDT 2007
"Zed A. Shaw" <zedshaw at zedshaw.com> writes:
> On Sun, 5 Aug 2007 17:02:12 -0700
> Corey Jewett <ml at syntheticplayground.com> wrote:
>> This is for when you pass mongrel 0 for the port and the OS assigns
>> an open one.
> Does that work on Windows? :-) (Gets them every time.)
Well, they just ripped off Berkeley sockets, right?
This is v1.8.2 of the one-click installer. I'll bother to update it
if anyone thinks it matters.
irb(main):001:0> require 'socket'
irb(main):002:0> s = TCPServer.new(0)
=> ["AF_INET", 1110, "0.0.0.0", "0.0.0.0"]
More information about the Mongrel-users