Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Add Echo to protocol
Browse files Browse the repository at this point in the history
Change-Id: Ia38d35fd87e899fe897297c61bb03c0ac839b77c
  • Loading branch information
pietern committed Jul 3, 2012
1 parent 1cadff2 commit cb58664
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions warden-protocol/lib/warden/protocol.rb
Expand Up @@ -22,6 +22,7 @@

require "warden/protocol/ping"
require "warden/protocol/list"
require "warden/protocol/echo"

module Warden
module Protocol
Expand Down
1 change: 1 addition & 0 deletions warden-protocol/lib/warden/protocol/base.rb
Expand Up @@ -25,6 +25,7 @@ module Type

Ping = 91
List = 92
Echo = 93

def self.generate_klass_map(suffix)
map = Hash[self.constants.map do |name|
Expand Down
13 changes: 13 additions & 0 deletions warden-protocol/lib/warden/protocol/echo.rb
@@ -0,0 +1,13 @@
require "warden/protocol/base"

module Warden
module Protocol
class EchoRequest < BaseRequest
required :message, :string, 1
end

class EchoResponse < BaseResponse
required :message, :string, 1
end
end
end

0 comments on commit cb58664

Please sign in to comment.