Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) {|socket| ... }Socket.tcp(host, port, local_host=nil, local_port=nil, [opts])
Class Public methods
creates a new socket object connected to host:port using TCP/IP.
If local_host:local_port is given, the socket is bound to it.
The optional last argument opts is options represented by a hash.
opts may have following options:
:connect_timeout
specify the timeout in seconds.
If a block is given, the block is called wi