class TCPSocket
- TCPSocket
- IPSocket
- Socket
- IO
- Reference
- Object
Overview
Override of the TCPSocket and HTTP::Client classes in order to allow an IP family to be selected for domains that resolve to both IPv4 and IPv6 addresses.
Defined in:
invidious/helpers/crystal_class_overrides.crConstructors
-
.new(host : String, port, dns_timeout = nil, connect_timeout = nil, family = Socket::Family::UNSPEC)
Creates a new TCP connection to a remote TCP server.
Constructor Detail
def self.new(host : String, port, dns_timeout = nil, connect_timeout = nil, family = Socket::Family::UNSPEC)
#
Creates a new TCP connection to a remote TCP server.
You may limit the DNS resolution time with dns_timeout and limit the
connection time to the remote server with connect_timeout. Both values
must be in seconds (integers or floats).
NOTE dns_timeout is currently only supported on Windows.