Class: Ftpd::DataServerFactory::RandomEphemeralPort
- Inherits:
-
Object
- Object
- Ftpd::DataServerFactory::RandomEphemeralPort
- Defined in:
- lib/ftpd/data_server_factory/random_ephemeral_port.rb
Overview
Factory for creating TCPServer used for passive mode connections. This factory binds to a random ephemeral port.
Instance Method Summary collapse
-
#initialize(interface) ⇒ RandomEphemeralPort
constructor
A new instance of RandomEphemeralPort.
- #make_tcp_server ⇒ TCPServer
Constructor Details
#initialize(interface) ⇒ RandomEphemeralPort
Returns a new instance of RandomEphemeralPort.
13 14 15 |
# File 'lib/ftpd/data_server_factory/random_ephemeral_port.rb', line 13 def initialize(interface) @interface = interface end |
Instance Method Details
#make_tcp_server ⇒ TCPServer
18 19 20 |
# File 'lib/ftpd/data_server_factory/random_ephemeral_port.rb', line 18 def make_tcp_server TCPServer.new(@interface, 0) end |