support "struct tcp_info" on non-Linux and Ruby 2.2+
commit873218e317773462be2a72556d26dc4a723cc7be
authorEric Wong <e@80x24.org>
Wed, 8 Mar 2017 04:56:46 +0000 (8 04:56 +0000)
committerEric Wong <e@80x24.org>
Wed, 8 Mar 2017 05:39:55 +0000 (8 05:39 +0000)
treed51829f7830eca74d90325822a7a5a0e9514cee2
parent8ce88a3756b110e5e3001f640ebd53a5b11d8c65
support "struct tcp_info" on non-Linux and Ruby 2.2+

Ruby 2.2+ can show "struct tcp_info" as a string via
Socket::Option#inspect, and we can attempt to parse it
out to extract the information we need.

Parsing this string is inefficient, but does not depend on the
ordering of the tcp_info struct.
lib/unicorn/http_request.rb