lib/polyphony/net.rb
# Wraps the given socket with an SSLSocket.
#
# @param socket [Socket] plain socket
# @param context [SSLContext] SSL context
# @return [SSLSocket] SSL socket
Wraps the given socket with an SSLSocket.
Wraps the given socket with an SSLSocket .
def secure_socket_wrapper(socket, context)
        if context
          OpenSSL::SSL::SSLSocket.new(socket, context)
        else
          OpenSSL::SSL::SSLSocket.new(socket)
        end
      end
def secure_socket_wrapper ( socket , context ) if context OpenSSL :: SSL :: SSLSocket . new ( socket , context ) else OpenSSL :: SSL :: SSLSocket . new ( socket ) end end
Wraps the given socket with an SSLSocket.
Wraps the given socket with an SSLSocket .
None
SSLSocket
socket
None
context
None