title: Close Socks Connection Ruby
body: <p>1)How do I check what port ruby uses for TCP connections?
  2)How do I make the last line of this code work?</p>
  
  <pre><code>require 'socksify'  #gem
  
  TCPSocket::socks_server = 'localhost'
  TCPSocket::socks_port = 9999 
  
  #do stuff 
  
  TCPSocket::socks_port = CLOSE SOCKS CONNECTION, GO BACK TO WHAT IT WAS BEFORE
  </code></pre>