Skip to content

Commit

Permalink
Remove file streaming packets.
Browse files Browse the repository at this point in the history
  • Loading branch information
roidrage committed Oct 27, 2010
1 parent 70e8ce7 commit 939ff0f
Showing 1 changed file with 0 additions and 68 deletions.
68 changes: 0 additions & 68 deletions lib/nanite/packets.rb
Expand Up @@ -39,74 +39,6 @@ def id_to_s(id)

end

# Deprecated: File streaming will be removed
# packet that means start of a file transfer
# operation
class FileStart < Packet

attr_accessor :filename, :token, :dest

def initialize(filename, dest, token, size=nil)
@filename = filename
@dest = dest
@token = token
@size = size
end

def self.json_create(o)
i = o['data']
new(i['filename'], i['dest'], i['token'], o['size'])
end

def to_s
"#{super} <#{token}> #{filename} to #{dest}"
end
end

# packet that means end of a file transfer
# operation
class FileEnd < Packet

attr_accessor :token, :meta

def initialize(token, meta, size=nil)
@token = token
@meta = meta
@size = size
end

def self.json_create(o)
i = o['data']
new(i['token'], i['meta'], o['size'])
end

def to_s
"#{super} <#{token}> meta #{meta}"
end
end

# packet that carries data chunks during a file transfer
class FileChunk < Packet

attr_accessor :chunk, :token

def initialize(token, size=nil, chunk=nil)
@chunk = chunk
@token = token
@size = size
end

def self.json_create(o)
i = o['data']
new(i['token'], o['size'], i['chunk'])
end

def to_s
"#{super} <#{token}>"
end
end
# </deprecated>

# packet that means a work request from mapper
# to actor node
#
Expand Down

0 comments on commit 939ff0f

Please sign in to comment.