Class: Proxi::TCPSocketFactory
- Inherits:
-
Object
- Object
- Proxi::TCPSocketFactory
- Defined in:
- lib/proxi/socket_factory.rb
Overview
### TCPSocketFactory
This is the most vanilla type of socket factory.
Suitable when all requests need to be forwarded to the same host and port.
Direct Known Subclasses
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(remote_host, remote_port) ⇒ TCPSocketFactory
constructor
A new instance of TCPSocketFactory.
Constructor Details
#initialize(remote_host, remote_port) ⇒ TCPSocketFactory
Returns a new instance of TCPSocketFactory.
10 11 12 |
# File 'lib/proxi/socket_factory.rb', line 10 def initialize(remote_host, remote_port) @remote_host, @remote_port = remote_host, remote_port end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/proxi/socket_factory.rb', line 14 def call TCPSocket.new(@remote_host, @remote_port) end |