nanomsg
Home Download Documentation Development Community Support
NOTE: This documentation is for version 0.3-beta-2 of nanomsg, but the latest released version is 1.1.5. Please see the documentation for 1.1.5 for the most up-to-date information.
nn_survey(7)

SYNOPSIS

#include <nanomsg/nn.h>

#include <nanomsg/survey.h>

DESCRIPTION

Allows to broadcast a survey to multiple locations and gather the responses.

Socket Types

NN_SURVEYOR

Used to send the survey. The survey is delivered to all the connected respondents. Once the query is sent, the socket can be used to receive the responses. When the survey deadline expires, receive will return ETIMEDOUT error.

NN_RESPONDENT

Use to respond to the survey. Survey is received using receive function, response is sent using send function. This socket can be connected to at most one peer.

Socket Options

NN_SURVEYOR_DEADLINE

Specifies how long to wait for responses to the survey. Once the deadline expires, receive function will return ETIMEDOUT error and all subsequent responses to the survey will be silently dropped. The deadline is measured in milliseconds. Option type is int. Default value is 1000 (1 second).

SEE ALSO

AUTHORS

Martin Sustrik <sustrik@250bpm.com>


"nanomsg" is a trademark of Garrett D'Amore.