Sha256: c459672a0f2a381af55f8c60a954166891cc8aafe75056a0c4354c810b102cc1
Contents?: true
Size: 530 Bytes
Versions: 7
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true module Ftpd module DataServerFactory # Factory for creating TCPServer used for passive mode connections. # This factory binds to a random ephemeral port. class RandomEphemeralPort # @param interface [String] The IP address of the interface to # bind to (e.g. "127.0.0.1") def initialize(interface) @interface = interface end # @return [TCPServer] def make_tcp_server TCPServer.new(@interface, 0) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems