<commit_before>`objc-zmq`: An Objective-C binding to `libzmq`
==============================================

This is an Objective-C version
of the reference ZeroMQ
[object-oriented C API][zmq-docs].
It follows the guidelines
laid out by the official
["Guidelines for ZeroMQ bindings"][binding-zmq].

[zmq-docs]: http://api.zeromq.org/zmq.html (zmq(7) Manual Page)
[binding-zmq]: http://www.zeromq.org/guidelines:bindings (Guidelines for ZeroMQ Bindings)

Documentation
-------------
Refer to the [ZeroMQ manual pages][zmq-docs].
The Objective-C binding
maintains a bit more state
than the C API exposes,
in that you can query
a `ZMQContext`
for its sockets
and query a `ZMQSocket`
for its context.

Thread Safety
-------------
ZeroMQ has some restrictive thread safety and coupling issues:

* Sockets can only be used from the thread that created them.
* All ZMQ sockets provided in a single call to `zmq_poll()` must have been created using the same context.

Because sockets
are coupled to contexts
for polling,
you have to track
each socket's context
and make sure not to mix them.
(The `ZMQSocket` class tracks this for you.)

Because each socket
is bound to the thread that created it,
you must be very careful when using
ZeroMQ sockets
with Grand Central Dispatch
or `NSOperationQueue`.
The only persistent thread
that these two expose
is the thread
you're least likely
to want to perform socket operations on:
the main thread.

To Do
-----
* Add functional tests in the form of sample code.
* Provide a more (Core)Foundation-like API
(CFSocket, CFFileDescriptor)
that takes advantage of the runloop.
This is complicated by
the threading constraints
present in libzmq-2.0.7.
<commit_msg>README.mkd: Fix formatting.<commit_after>`objc-zmq`: An Objective-C binding to `libzmq`
==============================================

This is an Objective-C version
of the reference ZeroMQ
[object-oriented C API][zmq-docs].
It follows the guidelines
laid out by the official
["Guidelines for ZeroMQ bindings"][binding-zmq].

[zmq-docs]: http://api.zeromq.org/zmq.html (zmq(7) Manual Page)
[binding-zmq]: http://www.zeromq.org/guidelines:bindings (Guidelines for ZeroMQ Bindings)

Documentation
-------------
Refer to the [ZeroMQ manual pages][zmq-docs].
The Objective-C binding
maintains a bit more state
than the C API exposes,
in that you can query
a `ZMQContext`
for its sockets
and query a `ZMQSocket`
for its context.

Thread Safety
-------------
ZeroMQ has some restrictive thread safety and coupling issues:

* Sockets can only be used from the thread that created them.
* All ZMQ sockets provided in a single call to `zmq_poll()` must have been created using the same context.

Because sockets
are coupled to contexts
for polling,
you have to track
each socket's context
and make sure not to mix them.
(The `ZMQSocket` class tracks this for you.)

Because each socket
is bound to the thread that created it,
you must be very careful when using
ZeroMQ sockets
with Grand Central Dispatch
or `NSOperationQueue`.
The only persistent thread
that these two expose
is the thread
you're least likely
to want to perform socket operations on:
the main thread.

To Do
-----
* Add functional tests in the form of sample code.
* Provide a more (Core)Foundation-like API
(`CFSocket`, `CFFileDescriptor`)
that takes advantage of the runloop.
This is complicated by
the threading constraints
present in libzmq-2.0.7.

{'fraction_non_alphanumeric': 0.10892542571931885, 'fraction_numerical': 0.002348796241926013, 'mean_word_length': 4.331768388106417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4243738', 'n_tokens_mistral': 1020, 'n_tokens_neox': 952, 'n_words': 466}