Skip to content

Commit

Permalink
Socket option handling clean ups for endpoints.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gdamore committed Nov 3, 2024
1 parent 4907623 commit ae6cd21
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 157 deletions.
14 changes: 14 additions & 0 deletions docs/ref/migrate/nng1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit ae6cd21

Please sign in to comment.