astro / socksify-ruby

Redirect any TCP connection initiated by a Ruby script through a SOCKS5 proxy
http://socksify.rubyforge.org/
Other
165 stars 79 forks source link

little code explaination please #23

Closed webattitude closed 9 years ago

webattitude commented 9 years ago

Hello, why isn't this https://github.com/astro/socksify-ruby/blob/master/lib/socksify.rb#L178 an infinite loop ?

astro commented 9 years ago

Why should it be?

webattitude commented 9 years ago

because initialize calls itself through its alias _initializetcp, doesn't it ? [edit] well, in case there is no socks server at class level [/edit]

webattitude commented 9 years ago

sorry if this is trivial, I'm pretty new to ruby and rails...

webattitude commented 9 years ago

It's ok, sorry. initialize_tcp is an alias for standard TCPSocket#initialize, right ?

webattitude commented 9 years ago

I came to know what alias is ^^ sorry to bother