# class GxG::Networking::ZMQ::ZmqSubscriber

### Public Class Methods

new(params={}) click to toggle source

    # File lib/gxg/gxg_zmq.rb, line 226
    def initialize(params={})
      params = self.vetted_parameters(params)
      @connector = ::EZMQ::Subscriber.new(params[:options])
      @connector.socket.identity = ::Celluloid::UUID::random_generate.to_s
      @open = true
      self
    end

### Public Instance Methods

subscribe(topic="") click to toggle source

    # File lib/gxg/gxg_zmq.rb, line 234
    def subscribe(topic="")
      if @open == true
        @connector.subscribe(topic)
      end
    end

unsubscribe(topic="") click to toggle source

    # File lib/gxg/gxg_zmq.rb, line 240
    def unsubscribe(topic="")
      if @open == true
        @connector.unsubscribe(topic)
      end
    end