Sha256: 601469623f78cccf7d710373c4c4eaa11995cd04318291a0f98a7054d2f195a4

Contents?: true

Size: 646 Bytes

Versions: 27

Compression:

Stored size: 646 Bytes

Contents

module Protobuf
  module Rpc
    module Zmq

      WORKER_READY_MESSAGE = "WORKER_READY"

      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

27 entries across 27 versions & 1 rubygems

Version Path
protobuf-2.7.2 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.7.1-java lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.7.1 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.7.0-java lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.7.0 lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.7.0.rc1-java lib/protobuf/rpc/servers/zmq/util.rb
protobuf-2.7.0.rc1 lib/protobuf/rpc/servers/zmq/util.rb