zeromq/pyzmq — pull request #447 by claws (2013-12-05 01:35:54+00:00)
Title: Add TOS packet priority socket option

This pull request adds the socket option Type-Of-Service (TOS), also referred to as DiffServ, to pyzmq. This lets me make use of network infrastructure to prioritise packets based on the TOS setting. I have recently added this option into libzmq, czmq and pyczmq. I'd like it available for my pyzmq applications too.

I am unfamiliar with the steps I need to go through to properly implement this change but this is what I have done so far:
1. I have the current master version of libzmq installed.
2. I have added the TOS option to the constant_names.py file.
3. I have run 'python setup.py constants' to regenerate 3 constants related files.
4 I have configured and installed my updated pyzmq.
4. I have run a test script (a modified version of publisher and subscriber from examples/pubsub) that use 's.tos' to set a TOS value and verified that the IP header fields are correctly set by inspecting the packets with wireshark.

While the XREP and XREQ are listed in my change they are nothing to do with my change. I have confirmed that these fields get added when using a fresh fork of pyzmq. I suspect that the auto-generated files had not been re-generated after those options were added in an earlier pyzmq change.