class TCPSocket
Public Class Methods
new(remote_host, remote_port, local_host=nil, local_port=nil)
click to toggle source
# File lib/sockit.rb, line 99 def initialize(remote_host, remote_port, local_host=nil, local_port=nil) if Sockit.enabled? && Sockit.connect_via_socks?(Sockit.resolve(remote_host)) initialize_tcp(Sockit.config.host, Sockit.config.port) Sockit.perform_v5_authenticate(self) if Sockit.is_socks_v5? Sockit.connect(self, remote_host, remote_port) else Sockit.direct_connect(self, remote_host, remote_port, local_host, local_port) end end
Also aliased as: initialize_tcp