2011/7/27 Eric Wong <normalperson / yhbt.net>:
>
> Proposed API would be:
>
>   TCPSocket.new(remote_host, remote_port,
>                 connect_timeout: 0.5, local_host: nil, local_port: nil)
>
> Or:
>
>   TCPSocket.new(remote_host, remote_port, connect_timeout: 0.5)

How about Socket class?
You can implement timeout on Socket.

I think you need full power of socket API,
so you should use low level bindings for socket API i.e. Socket class.

Note that Socket is not so cumbersome since Ruby 1.9.2.
-- 
Tanaka Akira