From a35e8745f354e5569a4416869e755934fff717b4 Mon Sep 17 00:00:00 2001
From: gdamore
The requester generally only has one outstanding request at a time unless -in raw mode, +in raw mode, and it will generally attempt to spread work requests to different peer repliers.
tip
-This property, when combined with a device -can help provide a degree of load-balancing.
+This property, when combined with a device can help provide a degree of load-balancing.
The REQ protocol is the requester side, and the REP protocol +
The REQ protocol is the requester side, and the REP protocol is the replier side.
The nng_req0_open functions create a REQ socket.
+
The nng_req0_open function creates a REQ socket.
This socket may be used to send messages (requests), and then to receive replies.
Generally a reply can only be received after sending a request.
(Attempts to receive a message will result in NNG_ESTATE if there is no
@@ -296,10 +295,10 @@ This will cause the requester to discard any reply from the earlier request,
but it will not stop a replier
from processing a request it has already received or terminate a request
that has already been placed on the wire.
Raw mode sockets ignore all these restrictions.
+Raw mode sockets ignore all these restrictions.
This protocol supports the creation of contexts for concurrent
-use cases using nng_ctx_open.
This protocol supports the creation of contexts for concurrent
+use cases using nng_ctx_open.
The NNG_OPT_REQ_RESENDTIME value may be configured differently
on contexts created this way.
Each context may have at most one outstanding request, and operates @@ -315,7 +314,7 @@ a separate socket.
NNG_OPT_REQ_RESENDTIME:
-(nng_duration)
+(nng_duration)
When a new request is started, a timer of this duration is also started.
If no reply is received before this timer expires, then the request will
be resent.
@@ -325,12 +324,12 @@ the original request was sent disconnects.
Resending may be deferred up to the value of the NNG_OPT_RESENDTICK parameter.
-If the value is set to NNG_DURATION_INFINITE, then resends are disabled
+If the value is set to NNG_DURATION_INFINITE, then resends are disabled
altogether. This should be used when the request is not idemptoent.
NNG_OPT_REQ_RESENDTICK:
-(nng_duration)
+(nng_duration)
This is the granularity of the clock that is used to check for resending.
The default is a second. Setting this to a higher rate will allow for
more timely resending to occur, but may incur significant additional
@@ -350,7 +349,7 @@ last element in the array, and must have the most significant bit set.<
There may be additional peer IDs preceding the request ID. These will be distinguishable from the request ID by having their most significant bit clear.
-When a request message is received by a forwarding node (such as a device), +
When a request message is received by a forwarding node (such as a device), the forwarding node prepends a 32-bit peer ID (which must have the most significant bit clear), which is the forwarder’s way of identifying the directly connected @@ -369,6 +368,18 @@ message, stripping it from the front of the message as it does so.
When the reply finally arrives back at the initiating requester, it should have only a single element in the message, which will be the request ID it originally used for the request.
+ + + + + + + + + -- cgit v1.2.3-70-g09d2