aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-21 22:48:32 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-21 22:48:32 -0800
commit925ac884f8bce34ad27fe18e851ebcecfe311356 (patch)
treef5ef6ed18876688a695af49a89df12114505f65f /src/sp/transport.h
parent7ea8abadec355eb7ea9f71fc2e2bdd73c1c77c62 (diff)
downloadnng-925ac884f8bce34ad27fe18e851ebcecfe311356.tar.gz
nng-925ac884f8bce34ad27fe18e851ebcecfe311356.tar.bz2
nng-925ac884f8bce34ad27fe18e851ebcecfe311356.zip
Collect the bound port as part of the URL at bind time.
This is a step on cleaning up our logic around NNG_OPT_URL.
Diffstat (limited to 'src/sp/transport.h')
-rw-r--r--src/sp/transport.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp/transport.h b/src/sp/transport.h
index 34584328..7311638f 100644
--- a/src/sp/transport.h
+++ b/src/sp/transport.h
@@ -76,8 +76,10 @@ struct nni_sp_listener_ops {
// reserving the address but not creating any connections.
// It should return NNG_EADDRINUSE if the address is already
// taken. It can also return NNG_EBADADDR for an unsuitable
- // address, or NNG_EACCESS for permission problems.
- int (*l_bind)(void *);
+ // address, or NNG_EACCESS for permission problems. The transport
+ // should update the url if it has changed (e.g. due to converting
+ // from port 0 to a real port.)
+ int (*l_bind)(void *, nng_url *);
// l_accept accepts an inbound connection.
void (*l_accept)(void *, nni_aio *);