Method: Mumble::Connection#connect
- Defined in:
- lib/mumble-ruby2/connection.rb
#connect ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/mumble-ruby2/connection.rb', line 14 def connect context = OpenSSL::SSL::SSLContext.new(:TLSv1) context.verify_mode = OpenSSL::SSL::VERIFY_NONE [:key, :cert].each { |s| context.send("#{s}=", @cert_manager.send(s)) } tcp_sock = TCPSocket.new @host, @port @sock = OpenSSL::SSL::SSLSocket.new tcp_sock, context @sock.connect end |