From ae6cd215afdb312b22827cd1abbbbe6a6164703f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Nov 2024 12:07:27 -0800 Subject: Socket option handling clean ups for endpoints. The framework for saving and replaying socket options was left over, and should not be used. But we do need to send the initial socket options to endpoints when creating them, so we have support for that in a cleaner fashion that does not require memory allocations. --- docs/ref/migrate/nng1.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs') diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index f44deb7c..4b96725d 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -90,6 +90,20 @@ options must be set on the endpoint (dialer or listener) using the appropriate to allocate and configure the endpoint before attaching it to the socket. This will also afford a much more fine-grained level of control over transport options. +The following options are copied from the socket when creating a dialer or listener, +but afterwards will not be changed on the dialer or listener if the socket +changes. It is recommended to set them properly on the socket before +creating dialers or listeners, or set them explicitly on the dialer or listener +directly: + +- `NNG_OPT_RECONNMINT` +- `NNG_OPT_RECONNMAXT` +- `NNG_OPT_RECVMAXSZ` + +The latter option is a hint for transports and intended to facilitate early +detection (and possibly avoidance of extra allocations) of oversize messages, +before bringing them into the socket itself. + ## Socket Options The `NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`, `NNG_OPT_PEER`, and `NNG_OPT_PEERNAME` options -- cgit v1.2.3-70-g09d2