diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-04-15 13:10:41 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-04-17 07:30:52 +0200 |
commit | 443d06f894751062da6d69238ce09f6fbfc27577 (patch) | |
tree | 44d21141df628f1cba965b7466267faa51f9d34c /include | |
parent | 692688206d5061de2a2b6a3d3040318dc537f221 (diff) |
"Survey" pattern implemented
Survey pattern is "multicast with reply". There are two roles:
surveyor and respondent. Surveyor publishes a survey which gets
delivered to all connected respondents. Each repondent can send
a response to the survey. All the responses are delivered to
the original surveyor. Once the surveyor decides that the survey
is over (e.g. deadline was reached) it can send initiate survey.
Late responses from old surveys are automatically discarded by
the surveyor socket.
Socket types: SURVEYOR, XSURVEYOR, RESPONDENT, XRESPONDENT
Patch also includes a test program with surveoyr, two respondents
and an intermediary device.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/xs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/xs.h b/include/xs.h index 17a557b..34d6c60 100644 --- a/include/xs.h +++ b/include/xs.h @@ -172,6 +172,10 @@ XS_EXPORT int xs_setctxopt (void *context, int option, const void *optval, #define XS_PUSH 8 #define XS_XPUB 9 #define XS_XSUB 10 +#define XS_SURVEYOR 11 +#define XS_RESPONDENT 12 +#define XS_XSURVEYOR 13 +#define XS_XRESPONDENT 14 /* Legacy socket type aliases. */ #define XS_ROUTER XS_XREP |