Class: Thrift::SSLServerSocket
Instance Attribute Summary collapse
Attributes inherited from ServerSocket
#handle
Instance Method Summary
collapse
#accept, #close, #closed?
#accept, #close, #closed?
Constructor Details
#initialize(host_or_port, port = nil, ssl_context = nil) ⇒ SSLServerSocket
25
26
27
28
|
# File 'lib/thrift/transport/ssl_server_socket.rb', line 25
def initialize(host_or_port, port = nil, ssl_context = nil)
super(host_or_port, port)
@ssl_context = ssl_context
end
|
Instance Attribute Details
#ssl_context ⇒ Object
Returns the value of attribute ssl_context.
30
31
32
|
# File 'lib/thrift/transport/ssl_server_socket.rb', line 30
def ssl_context
@ssl_context
end
|
Instance Method Details
#listen ⇒ Object
32
33
34
35
|
# File 'lib/thrift/transport/ssl_server_socket.rb', line 32
def listen
socket = TCPServer.new(@host, @port)
@handle = OpenSSL::SSL::SSLServer.new(socket, @ssl_context)
end
|
#to_s ⇒ Object
37
38
39
|
# File 'lib/thrift/transport/ssl_server_socket.rb', line 37
def to_s
"ssl(#{super.to_s})"
end
|