<commit_before>Celluloid::ZMQ
==============

This gem uses the ffi-rzmq library to provide Celluloid actors that can
interact with 0MQ sockets.

Celluloid::ZMQ provides two methods for multiplexing 0MQ sockets with
receiving messages over Celluloid's actor protocol:

* Celluloid::ZMQ#wait_readable(socket): wait until a message is available to
  read from the given 0MQ socket
* Celluloid::ZMQ#wait_writeable(socket): waits until there's space in the
  given socket's message buffer to send another message

Usage:

    require 'celluloid-zmq'

	ZMQ_CONTEXT = ZMQ::Context.new(1)

    class MyZmqCell
      include Celluloid::ZMQ

      def initialize(addr)
        @socket = ZMQ_CONTEXT.socket(ZMQ::PUSH)

        unless ZMQ::Util.resultcode_ok? @socket.connect addr
	      @socket.close
	      raise "error connecting to #{addr}: #{ZMQ::Util.error_string}"
        end
      end

      def write(message)
        wait_writeable @socket
        unless ZMQ::Util.resultcode_ok? @socket.send_string message
          raise "error sending 0MQ message: #{ZMQ::Util.error_string}"
        end
      end

      def read
        wait_readable @socket
        message = ''

	    rc = @socket.recv_string message
	    if ZMQ::Util.resultcode_ok? rc
	      handle_message message
	    else
	      raise "error receiving ZMQ string: #{ZMQ::Util.error_string}"
	    end
      end
    end
<commit_msg>Reconfigure DCell to use the celluloid-zmq gem<commit_after>Celluloid::ZMQ
==============

This gem uses the ffi-rzmq library to provide Celluloid actors that can
interact with 0MQ sockets.

Celluloid::ZMQ provides two methods for multiplexing 0MQ sockets with
receiving messages over Celluloid's actor protocol:

* Celluloid::ZMQ#wait_readable(socket): wait until a message is available to
  read from the given 0MQ socket
* Celluloid::ZMQ#wait_writeable(socket): waits until there's space in the
  given socket's message buffer to send another message

Example Usage:

    require 'celluloid-zmq'

	ZMQ_CONTEXT = ZMQ::Context.new(1)

    class MyZmqCell
      include Celluloid::ZMQ

      def initialize(addr)
        @socket = ZMQ_CONTEXT.socket(ZMQ::PUSH)

        unless ZMQ::Util.resultcode_ok? @socket.connect addr
	      @socket.close
	      raise "error connecting to #{addr}: #{ZMQ::Util.error_string}"
        end
      end

      def write(message)
        wait_writeable @socket
        unless ZMQ::Util.resultcode_ok? @socket.send_string message
          raise "error sending 0MQ message: #{ZMQ::Util.error_string}"
        end
      end

      def read
        wait_readable @socket
        message = ''

	    rc = @socket.recv_string message
	    if ZMQ::Util.resultcode_ok? rc
	      handle_message message
	    else
	      raise "error receiving ZMQ string: #{ZMQ::Util.error_string}"
	    end
      end
    end

Copyright
---------

Copyright (c) 2011 <NAME>. See LICENSE.txt for further details.
{'fraction_non_alphanumeric': 0.08837689133425035, 'fraction_numerical': 0.004814305364511692, 'mean_word_length': 3.0571827057182706, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4166277', 'n_tokens_mistral': 950, 'n_tokens_neox': 846, 'n_words': 269}