Sha256: f2945e2cf89f722bc82d0b28d7a15ce96df95788a68199b94c71827dd9398e55

Contents?: true

Size: 600 Bytes

Versions: 7

Compression:

Stored size: 600 Bytes

Contents

module Protobuf
  module Rpc
    module Zmq

      module Util
        include ::Protobuf::Logger::LogMethods
        def self.included(base)
          base.extend(::Protobuf::Rpc::Zmq::Util)
        end

        def zmq_error_check(return_code)
          raise "Last API call failed with \"#{::ZMQ::Util.error_string}\"#{$/}#{$/}#{caller(1)}" unless return_code >= 0
        end

        def log_signature
          @log_signature ||= "server-#{self.class}-#{object_id}"
        end

        def resolve_ip(hostname)
          ::Resolv.getaddress(hostname)
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
protobuf-2.0.0.rc3 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.0.0.rc2 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.0.0.rc1 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-1.4.2 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-1.4.1 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-1.4.0 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-1.3.0 lib/protobuf/rpc/servers/zmq/util.rb