Class: Playwright::WebSocketClient::SecureSocketFactory
- Inherits:
-
Object
- Object
- Playwright::WebSocketClient::SecureSocketFactory
- Defined in:
- lib/playwright/web_socket_client.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(host, port) ⇒ SecureSocketFactory
constructor
A new instance of SecureSocketFactory.
Constructor Details
#initialize(host, port) ⇒ SecureSocketFactory
Returns a new instance of SecureSocketFactory.
15 16 17 18 |
# File 'lib/playwright/web_socket_client.rb', line 15 def initialize(host, port) @host = host @port = port || 443 end |
Instance Method Details
#create ⇒ Object
20 21 22 23 |
# File 'lib/playwright/web_socket_client.rb', line 20 def create tcp_socket = TCPSocket.new(@host, @port) OpenSSL::SSL::SSLSocket.new(tcp_socket).tap(&:connect) end |