smira/txZMQ — pull request #32 by eallik (2012-09-02 12:06:26+00:00)
Title: Mainly just added ZmqRouterConnection and ZmqDealerConnection

I admit that the naming scheme is inconsistent with the current one and should be ZmqROUTERConnection and ZmqDEALERConnection, however:

1) the current naming scheme is not actually consistent with PascalCase;
2) it says there is a one-to-one mapping between our connection classes and acutal ZMQ sockets, e.g. ZmqREQConnection and ZmqREPConnection are not even using REQ and REP but instead DEALER and ROUTER, which might and probably will be confusing for users who expect to find the underlying physical socket to be REQ and REP. So ideally those too, and others as well, would eventually be renamed (with a deprecated alias, for a while) to ZmqRequestConnection and ZmqReplyConnection; also, these names look friendlier.

Furthermore, I added a ZmqBase base class to `router_dealer.py` which seems redundant at first, but I've added extensive (doc-)comments to the class explaining the rational, and what I hope might be a future addition to all other connection classes, if such a—somewhat backwards incompatible, due to signature changes to `sendMsg`—change is acceptable to you. I will continue to push commits with this in mind where I will extract ZmqBase to a base.py file, and attempt to refactor other connection types to be based on that instead.