Skip to content

Commit

Permalink
Problem: zsock constructor is not nice for bindings
Browse files Browse the repository at this point in the history
It's nicer to let users pass names like 'sub' when creating a
new socket.

Solution: add 'map' values to argument, for optional use by a
binding target in zproject.
  • Loading branch information
hintjens committed Apr 9, 2016
1 parent 36c4115 commit e3264e1
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion api/zsock.api
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,25 @@
variant, enabling intelligent socket leak detection. This can have
performance implications if you use a LOT of sockets. To turn off this
redirection behaviour, define ZSOCK_NOCHECK.
<argument name = "type" type = "integer" />
<argument name = "type" type = "integer">
<!-- Allow text names in binding APIs -->
<map name = "PAIR" value = "ZMQ_PAIR" />
<map name = "PUB" value = "ZMQ_PUB" />
<map name = "SUB" value = "ZMQ_SUB" />
<map name = "REQ" value = "ZMQ_REQ" />
<map name = "REP" value = "ZMQ_REP" />
<map name = "DEALER" value = "ZMQ_DEALER" />
<map name = "ROUTER" value = "ZMQ_ROUTER" />
<map name = "PULL" value = "ZMQ_PULL" />
<map name = "PUSH" value = "ZMQ_PUSH" />
<map name = "XPUB" value = "ZMQ_XPUB" />
<map name = "XSUB" value = "ZMQ_XSUB" />
<map name = "STREAM" value = "ZMQ_STREAM" />
<map name = "SERVER" value = "ZMQ_SERVER" />
<map name = "CLIENT" value = "ZMQ_CLIENT" />
<map name = "RADIO" value = "ZMQ_RADIO" />
<map name = "DISH" value = "ZMQ_DISH" />
</argument>
</constructor>

<destructor>
Expand Down

0 comments on commit e3264e1

Please sign in to comment.