summaryrefslogtreecommitdiff
path: root/src/surveyor.cpp
AgeCommit message (Collapse)Author
2012-05-31Polling on SURVEYOR socket implementedMartin Sustrik
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-21Fix a warning in MSVC buildMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-20Clock instance removed from surveyor_tMartin Sustrik
SURVEYOR socket now uses clock instance from socket_base_t for measuring survey timeout. This allows for better performance in tight xs_recv() loops. 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>