zeromq/libzmq — pull request #854 by lalebarde (2014-01-24 16:10:55+00:00)
Title: add a proxy hook

This is a proxy hook to ease the development of different kinds of proxy for say filtering, tests, ROUTER/ROUTER proxy, STREAM/STREAM proxy, etc.

Here is the output of the test in verbose mode:

```
---------- standard proxy ----------
server receive - identity = AEA6-FCA5 content = request #001
server receive - identity = BB41-BF32 content = request #001
server receive - identity = 5641-B0F2 content = request #001
client receive - identity = AEA6-FCA5 content = request #001
client receive - identity = AEA6-FCA5 content = request #001
client receive - identity = AEA6-FCA5 content = request #001
client receive - identity = 5641-B0F2 content = request #001
server receive - identity = AEA6-FCA5 content = request #002
server receive - identity = 5641-B0F2 content = request #002
client receive - identity = 5641-B0F2 content = request #002
client receive - identity = 5641-B0F2 content = request #002
client receive - identity = AEA6-FCA5 content = request #002
client receive - identity = 5641-B0F2 content = request #002
client receive - identity = AEA6-FCA5 content = request #002
server receive - identity = BB41-BF32 content = request #002
client receive - identity = BB41-BF32 content = request #002
client receive - identity = AEA6-FCA5 content = request #002
client receive - identity = BB41-BF32 content = request #002
client receive - identity = 5641-B0F2 content = request #002
client receive - identity = BB41-BF32 content = request #002
client receive - identity = BB41-BF32 content = request #002
server_worker receives command = TERMINATE
client receive - identity = BB41-BF32 command = TERMINATE
server_worker receives command = TERMINATE
client receive - identity = 5641-B0F2 command = TERMINATE
server_worker receives command = TERMINATE
client receive - identity = AEA6-FCA5 command = TERMINATE
server_worker receives command = TERMINATE
---------- hooked proxy ----------
server_worker receives command = TERMINATE
server receive - identity = 5641-B0F2 content = REQUEST #003
client receive - identity = 5641-B0F2 content = request #003
server receive - identity = AEA6-FCA5 content = REQUEST #003
client receive - identity = 5641-B0F2 content = request #003
client receive - identity = AEA6-FCA5 content = request #003
server receive - identity = BB41-BF32 content = REQUEST #003
client receive - identity = BB41-BF32 content = request #003
client receive - identity = BB41-BF32 content = request #003
client receive - identity = BB41-BF32 content = request #003
client receive - identity = BB41-BF32 content = request #003
server_worker receives command = TERMINATE
server_worker receives command = TERMINATE
frontend to backend hook hits = 3
backend to frontend hook hits = 7
server_worker receives command = TERMINATE
server_worker receives command = TERMINATE
client receive - identity = AEA6-FCA5 command = TERMINATE
server_worker receives command = STOP
server_worker receives command = TERMINATE
server_worker receives command = STOP
client receive - identity = 5641-B0F2 command = TERMINATE
client receive - identity = BB41-BF32 command = TERMINATE
server_worker receives command = STOP
server_worker receives command = STOP
client receive - identity = AEA6-FCA5 command = STOP
server_worker receives command = STOP
client receive - identity = 5641-B0F2 command = STOP
client receive - identity = BB41-BF32 command = STOP
```