Ruby TCPSocket Functions

EditRocket provides the following information on TCPSocket functions in the Ruby source code builder.

gethostbyname" Socket.gethostbyname(host) - Resolve host and return name and address information for it, similarly to gethostbyname(3). host can be a domain name or the presentation format of an address.

new(remote_host, remote_port, local_host=nil, local_port=nil) - Opens a TCP connection to remote_host on remote_port. If local_host and local_port are specified, then those parameters are used on the local end to establish the connection.