Method: ContentServer::FileCopyServer#initialize
- Defined in:
- lib/content_server/queue_copy.rb
#initialize(copy_input_queue, port) ⇒ FileCopyServer
Returns a new instance of FileCopyServer.
140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/content_server/queue_copy.rb', line 140 def initialize(copy_input_queue, port) # Local simple tcp connection. @backup_tcp = Networking::TCPServer.new(port, method(:receive_message)) @copy_input_queue = copy_input_queue # Stores for each checksum, the file source path. # TODO(kolman): If there are items in copy_prepare which timeout (don't get ack), # resend the ack request. @copy_prepare = {} @file_streamer = FileStreamer.new(method(:send_chunk)) Log.debug3("initialize FileCopyServer on port:%s", port) @file_copy_manager = FileCopyManager.new(@copy_input_queue, @file_streamer) end |