var searchIndex = {}; searchIndex["nanomsg"] = {"doc":"","items":[[3,"Socket","nanomsg","A type-safe socket wrapper around nanomsg's own socket implementation. This\nprovides a safe interface for dealing with initializing the sockets, sending\nand receiving messages.",null,null],[3,"PollFd","","A request for polling a socket and the poll result.\nTo create the request, see `Socket::new_pollfd`.\nTo get the result, see `PollFd::can_read` and `PollFd::can_write`.",null,null],[3,"PollRequest","","A request for polling a set of sockets and the poll results.\nTo create the request, see `PollRequest::new`.",null,null],[4,"Protocol","","Type-safe protocols that Nanomsg uses. Each socket\nis bound to a single protocol that has specific behaviour\n(such as only being able to receive messages and not send 'em).",null,null],[13,"Req","","Used to implement the client application that sends requests and receives replies.",0,null],[13,"Rep","","Used to implement the stateless worker that receives requests and sends replies.",0,null],[13,"Push","","This socket is used to send messages to a cluster of load-balanced nodes.\nReceive operation is not implemented on this socket type.",0,null],[13,"Pull","","This socket is used to receive a message from a cluster of nodes.\nSend operation is not implemented on this socket type.",0,null],[13,"Pair","","Socket for communication with exactly one peer.\nEach party can send messages at any time. \nIf the peer is not available or send buffer is full subsequent calls to `write`\nwill block until it’s possible to send the message.",0,null],[13,"Bus","","Sent messages are distributed to all nodes in the topology.\nIncoming messages from all other nodes in the topology are fair-queued in the socket.",0,null],[13,"Pub","","This socket is used to distribute messages to multiple destinations.\nReceive operation is not defined.",0,null],[13,"Sub","","Receives messages from the publisher.\nOnly messages that the socket is subscribed to are received.\nWhen the socket is created there are no subscriptions and thus no messages will be received.\nSend operation is not defined on this socket.",0,null],[13,"Surveyor","","Used to send the survey.\nThe survey is delivered to all the connected respondents.\nOnce the query is sent, the socket can be used to receive the responses.\nWhen the survey deadline expires, receive will return Timeout error.",0,null],[13,"Respondent","","Use to respond to the survey.\nSurvey is received using receive function, response is sent using send function\nThis socket can be connected to at most one peer.",0,null],[4,"Transport","","",null,null],[13,"Inproc","","In-process transport",1,null],[13,"Ipc","","Inter-process transport",1,null],[13,"Tcp","","TCP transport",1,null],[4,"PollInOut","","",null,null],[13,"In","","Check whether at least one message can be received from the socket without blocking.",2,null],[13,"Out","","Check whether at least one message can be sent to the fd socket without blocking.",2,null],[13,"InOut","","Check whether at least one message can be sent to or received from the fd socket without blocking.",2,null],[0,"result","","",null,null],[4,"Error","nanomsg::result","",null,null],[13,"Unknown","","",3,null],[13,"OperationNotSupported","","",3,null],[13,"ProtocolNotSupported","","",3,null],[13,"NoBufferSpace","","",3,null],[13,"NetworkDown","","",3,null],[13,"AddressInUse","","",3,null],[13,"AddressNotAvailable","","",3,null],[13,"ConnectionRefused","","",3,null],[13,"OperationNowInProgress","","",3,null],[13,"NotSocket","","",3,null],[13,"AddressFamilyNotSupported","","",3,null],[13,"WrongProtocol","","",3,null],[13,"TryAgain","","",3,null],[13,"BadFileDescriptor","","",3,null],[13,"InvalidInput","","",3,null],[13,"TooManyOpenFiles","","",3,null],[13,"BadAddress","","",3,null],[13,"PermissionDenied","","",3,null],[13,"NetworkReset","","",3,null],[13,"NetworkUnreachable","","",3,null],[13,"HostUnreachable","","",3,null],[13,"NotConnected","","",3,null],[13,"MessageTooLong","","",3,null],[13,"TimedOut","","",3,null],[13,"ConnectionAborted","","",3,null],[13,"ConnectionReset","","",3,null],[13,"ProtocolNotAvailable","","",3,null],[13,"AlreadyConnected","","",3,null],[13,"SocketTypeNotSupported","","",3,null],[13,"Terminating","","",3,null],[13,"NameTooLong","","",3,null],[13,"NoDevice","","",3,null],[13,"FileStateMismatch","","",3,null],[13,"Interrupted","","",3,null],[5,"last_nano_error","","",null,{"inputs":[],"output":{"name":"error"}}],[6,"Result","","",null,null],[11,"eq","","",3,null],[11,"clone","","",3,null],[11,"to_raw","","",3,null],[11,"from_raw","","",3,{"inputs":[{"name":"c_int"}],"output":{"name":"error"}}],[11,"description","","",3,null],[11,"from","","",3,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"fmt","","",3,null],[11,"fmt","","",3,null],[0,"endpoint","nanomsg","",null,null],[3,"Endpoint","nanomsg::endpoint","An endpoint created for a specific socket. Each endpoint is identified\nby a unique return value that can be further passed to a shutdown\nfunction. The shutdown is done through the endpoint itself and not the Socket",null,null],[11,"new","","",4,{"inputs":[{"name":"c_int"},{"name":"c_int"}],"output":{"name":"endpoint"}}],[11,"shutdown","","Removes an endpoint from the socket that created it (via `bind` or `connect`).\nThe call will return immediately, however, \nthe library will try to deliver any outstanding outbound messages to the endpoint \nfor the time specified by `Socket::set_linger`.",4,null],[11,"clone","nanomsg","",0,null],[11,"eq","","",0,null],[11,"fmt","","",0,null],[11,"clone","","",1,null],[11,"eq","","",1,null],[11,"fmt","","",1,null],[11,"to_raw","","",1,null],[11,"clone","","",2,null],[11,"clone","","",5,null],[11,"can_read","","Checks whether at least one message can be received from the socket without blocking.",5,null],[11,"can_write","","Checks whether at least one message can be sent to the fd socket without blocking.",5,null],[11,"new","","Creates a request from the specified individualsocket requests.",6,null],[11,"get_fds","","Returns a reference to the socket requests, so they can be checked.",6,null],[11,"new","","Allocate and initialize a new Nanomsg socket which returns\na new file descriptor behind the scene. The safe interface doesn't\nexpose any of the underlying file descriptors and such.",7,{"inputs":[{"name":"protocol"}],"output":{"name":"result"}}],[11,"new_for_device","","Allocate and initialize a new Nanomsg socket meant to be used in a device",7,{"inputs":[{"name":"protocol"}],"output":{"name":"result"}}],[11,"bind","","Creating a new socket through `Socket::new` does **not**\nbind that socket to a listening state. Instead, one has to be\nexplicit in enabling the socket to listen onto a specific address.",7,null],[11,"connect","","Connects the socket to a remote endpoint.\nReturns the endpoint on success.",7,null],[11,"nb_read","","Non-blocking version of the `read` function.\nReturns the number of read bytes on success.\nAny bytes exceeding the length specified by `buf.len()` will be truncated.\nAn error with the `Error::TryAgain` kind is returned if there's no message to receive for the moment.",7,null],[11,"nb_read_to_end","","Non-blocking version of the `read_to_end` function.\nCopy the message allocated by nanomsg into the buffer on success.\nAn error with the `Error::TryAgain` kind is returned if there's no message to receive for the moment.",7,null],[11,"nb_write","","Non-blocking version of the `write` function.\nAn error with the `Error::TryAgain` kind is returned if the message cannot be sent at the moment.",7,null],[11,"zc_write","","Zero-copy version of the `write` function.",7,null],[11,"allocate_msg","","Allocate a message of the specified size to be sent in zero-copy fashion.\nThe content of the message is undefined after allocation and it should be filled in by the user.\nWhile `write` functions allow to send arbitrary buffers, \nbuffers allocated using `allocate_msg` can be more efficient for large messages \nas they allow for using zero-copy techniques.",7,{"inputs":[{"name":"usize"}],"output":{"name":"result"}}],[11,"free_msg","","Deallocates a message allocated using `allocate_msg` function",7,null],[11,"new_pollfd","","Creates a poll request for the socket with the specified check criteria.\n- **pollinout:** See `PollInOut` for options",7,null],[11,"poll","","Checks a set of sockets and reports whether it’s possible to send a message to the socket and/or receive a message from each socket.\nUpon successful completion, the number of `PollFd` structures with events signaled is returned. ",7,{"inputs":[{"name":"pollrequest"},{"name":"isize"}],"output":{"name":"result"}}],[11,"device","","Starts a device to forward messages between two sockets.\nIf both sockets are valid, `device` function loops\nand sends and messages received from s1 to s2 and vice versa.\nIf only one socket is valid and the other is negative,\n`device` works in a "loopback" mode — \nit loops and sends any messages received from the socket back to itself.\nTo break the loop and make `device` function exit use `terminate` function.",7,{"inputs":[{"name":"socket"},{"name":"socket"}],"output":{"name":"result"}}],[11,"terminate","","Notify all sockets about process termination.\nTo help with shutdown of multi-threaded programs nanomsg provides the `terminate` function \nwhich informs all the open sockets that process termination is underway.\nIf a socket is blocked inside a blocking function, such as `read`,\nit will be unblocked and `Terminating` error will be returned to the user. \nSimilarly, any subsequent attempt to invoke a socket function other than `drop` after `terminate` was called will result in `Terminating` error.\nIf waiting inside a polling function, the call will unblock with both read and write signaled.\nThe `terminate` function itself is non-blocking.",7,{"inputs":[],"output":null}],[11,"set_linger","","Specifies how long the socket should try to send pending outbound messages after `drop` have been called.\nNegative value means infinite linger. Default value is 1000 (1 second).",7,null],[11,"set_send_buffer_size","","Size of the send buffer, in bytes. To prevent blocking for messages larger than the buffer,\nexactly one message may be buffered in addition to the data in the send buffer.\nDefault value is 128kB.",7,null],[11,"set_receive_buffer_size","","Size of the receive buffer, in bytes. To prevent blocking for messages larger than the buffer,\nexactly one message may be buffered in addition to the data in the receive buffer.\nDefault value is 128kB.",7,null],[11,"set_send_timeout","","The timeout for send operation on the socket.\nIf message cannot be sent within the specified timeout, TryAgain error is returned.\nNegative value means infinite timeout. Default value is infinite timeout.",7,null],[11,"set_receive_timeout","","The timeout for recv operation on the socket.\nIf message cannot be received within the specified timeout, TryAgain error is returned.\nNegative value means infinite timeout. Default value is infinite timeout.",7,null],[11,"set_reconnect_interval","","For connection-based transports such as TCP, this option specifies how long to wait,\nwhen connection is broken before trying to re-establish it.\nNote that actual reconnect interval may be randomised to some extent to prevent severe reconnection storms.\nDefault value is 100 milliseconds.",7,null],[11,"set_max_reconnect_interval","","This option is to be used only in addition to `set_reconnect_interval` option.\nIt specifies maximum reconnection interval. On each reconnect attempt,\nthe previous interval is doubled until `max_reconnect_interval` is reached.\nValue of zero means that no exponential backoff is performed and\nreconnect interval is based only on `reconnect_interval`.\nIf `max_reconnect_interval` is less than `reconnect_interval`, it is ignored.\nDefault value is 0.",7,null],[11,"set_send_priority","","Sets outbound priority for endpoints subsequently added to the socket.\nThis option has no effect on socket types that send messages to all the peers.\nHowever, if the socket type sends each message to a single peer (or a limited set of peers),\npeers with high priority take precedence over peers with low priority.\nHighest priority is 1, lowest priority is 16. Default value is 8.",7,null],[11,"set_receive_priority","","Sets inbound priority for endpoints subsequently added to the socket.\nThis option has no effect on socket types that are not able to receive messages.\nWhen receiving a message, messages from peer with higher priority are received before messages\nfrom peer with lower priority. \nHighest priority is 1, lowest priority is 16. Default value is 8.",7,null],[11,"set_ipv4_only","","If set to true, only IPv4 addresses are used.\nIf set to false, both IPv4 and IPv6 addresses are used.\nDefault value is true.",7,null],[11,"set_socket_name","","Socket name for error reporting and statistics.\nDefault value is "socket.N" where N is socket integer.\n**This option is experimental, see `Socket::env` for details**",7,null],[11,"set_tcp_nodelay","","This option, when set to `true`, disables Nagle’s algorithm.\nIt also disables delaying of TCP acknowledgments.\nUsing this option improves latency at the expense of throughput.",7,null],[11,"subscribe","","Defined on full `Sub` socket.\nSubscribes for a particular topic.\nType of the option is string.\nA single `Sub` socket can handle multiple subscriptions.",7,null],[11,"unsubscribe","","Defined on full `Sub` socket. Unsubscribes from a particular topic.",7,null],[11,"set_survey_deadline","","Specifies how long to wait for responses to the survey.\nOnce the deadline expires, receive function will return `Timeout` error and all subsequent responses to the survey will be silently dropped.\nThe deadline is measured in milliseconds. Default value is 1 second.",7,null],[11,"set_request_resend_interval","","This option is defined on the full `Req` socket.\nIf reply is not received in specified amount of milliseconds, the request will be automatically resent.\nThe type of this option is int. Default value is 1 minute.",7,null],[11,"read","","Receive a message from the socket and store it in the buffer argument.\nAny bytes exceeding the length specified by `buffer.len()` will be truncated.\nReturns the number of bytes in the message on success.",7,null],[11,"read_to_end","","Receive a message from the socket. Copy the message allocated by nanomsg into the buffer on success.",7,null],[11,"read_to_string","","Receive a message from the socket. Copy the message allocated by nanomsg into the buffer on success.\nIf the data in the message is not valid UTF-8 then an error is returned and buffer is unchanged.",7,null],[11,"write","","The function will send a message containing the data from the buf parameter to the socket.\nWhich of the peers the message will be sent to is determined by the particular socket type.",7,null],[11,"flush","","",7,null],[11,"drop","","Closes the socket.\nAny buffered inbound messages that were not yet received by the application will be discarded.\nThe library will try to deliver any outstanding outbound messages for the time specified by `set_linger`. \nThe call will block in the meantime.",7,null]],"paths":[[4,"Protocol"],[4,"Transport"],[4,"PollInOut"],[4,"Error"],[3,"Endpoint"],[3,"PollFd"],[3,"PollRequest"],[3,"Socket"]]}; initSearch(searchIndex);