Sha256: 10ed8f92f5ded71b20f401b973f2805ae8b9674d007206d655f5dd0a36d06a12

Contents?: true

Size: 1.51 KB

Versions: 3

Compression:

Stored size: 1.51 KB

Contents

# encoding: utf-8

require 'pio/echo/format'
require 'pio/echo/message'

module Pio
  # OpenFlow Echo Request and Reply message parser.
  class Echo
    # OpenFlow 1.0 Echo Reply message.
    class Reply < Message
      # Creates an EchoReply OpenFlow message. This message can be
      # used to measure the bandwidth of a controller/switch
      # connection as well as to verify its liveness.
      #
      # @overload initialize()
      #   @example
      #     Pio::Echo::Reply.new
      #
      # @overload initialize(transaction_id)
      #   @example
      #     Pio::Echo::Reply.new(123)
      #   @param [Number] transaction_id
      #     An unsigned 32-bit integer number associated with this
      #     message.
      #
      # @overload initialize(user_options)
      #   @example
      #     Pio::Echo::Reply.new(
      #       transaction_id: transaction_id,
      #       user_data: 'Thu Aug 25 13:09:00 +0900 2011'
      #     )
      #   @param [Hash] user_options The options to create a message with.
      #   @option user_options [Number] :transaction_id
      #   @option user_options [Number] :xid An alias to transaction_id.
      #   @option user_options [String] :user_data
      #     The user data field specified as a String may be a message
      #     timestamp to check latency, various lengths to measure
      #     bandwidth or zero-size(nil) to verify liveness between the
      #     switch and controller.
      def initialize(user_options = {})
        super REPLY, user_options
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pio-0.8.1 lib/pio/echo/reply.rb
pio-0.8.0 lib/pio/echo/reply.rb
pio-0.7.0 lib/pio/echo/reply.rb