summaryrefslogtreecommitdiff
path: root/tests/survey.cpp
AgeCommit message (Collapse)Author
2012-06-14errno errors reported in testsMartin Sustrik
Till now when a test failed the value or errno haven't been reported. This patch fixes the problem. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-21Expired survey returns ETIMEDOUT instead of EAGAINMartin Sustrik
Up to now, when survey in surveyor pattern expired, xs_recv() returned EAGAIN. That made it impossible to distinguish epired survey from expired receive timeout (XS_RCVTIMEO). This patch make errors different in both cases. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-21xs_shutdown implementedMartin Sustrik
This patch allows for partial shutdown of the socket. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-18Test that old surveys are discardedMartin Sustrik
Improvement to the "survey" test Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-17XS_SURVEY_TIMEOUT socket option added.Martin Sustrik
It can be used to timeout the survey. Value is in milliseconds and -1 means infinite (default). Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-17"Survey" pattern implementedMartin Sustrik
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>