class Thrift::SSLSocket
Attributes
Public Class Methods
Source
# File lib/thrift/transport/ssl_socket.rb 22 def initialize(host='localhost', port=9090, timeout=nil, ssl_context=nil) 23 super(host, port, timeout) 24 @ssl_context = ssl_context 25 end
Calls superclass method
Thrift::Socket::new
Public Instance Methods
Source
# File lib/thrift/transport/ssl_socket.rb 29 def open 30 socket = super 31 @handle = OpenSSL::SSL::SSLSocket.new(socket, @ssl_context) 32 begin 33 @handle.connect_nonblock 34 @handle.post_connection_check(@host) 35 @handle 36 rescue IO::WaitReadable 37 IO.select([ @handle ], nil, nil, @timeout) 38 retry 39 rescue IO::WaitWritable 40 IO.select(nil, [ @handle ], nil, @timeout) 41 retry 42 rescue StandardError => e 43 raise TransportException.new(TransportException::NOT_OPEN, "Could not connect to #{@desc}: #{e}") 44 end 45 end
Calls superclass method
Thrift::Socket#open