]> git.meshlink.io Git - meshlink/commit
Add meshlink_set_channel_listen_cb().
authorGuus Sliepen <guus@meshlink.io>
Wed, 29 Jul 2020 12:44:42 +0000 (14:44 +0200)
committerGuus Sliepen <guus@meshlink.io>
Wed, 29 Jul 2020 13:13:21 +0000 (15:13 +0200)
commite40d5bf3a0e030105334046319f377efbf3f06c4
tree7aadc207e282de9512435f5ae69a7d414de1f846
parentf84fc9da827afbc7bc7bd14fa94b84ee9922e575
Add meshlink_set_channel_listen_cb().

The accept callback is called when the peer has already fully established a
connection. The listen callback is called earlier, when there is no
fully established channel yet. However, the listen callback itself does not
get a channel handle, it can only make a decision based on the peer node
and port number whether to accept the channel, and if so the accept callback
will be called later.
16 files changed:
src/meshlink++.h
src/meshlink.c
src/meshlink.h
src/meshlink.sym
src/meshlink_internal.h
src/utcp.c
src/utcp.h
src/utcp_priv.h
test/channels-aio-fd.c
test/channels-aio.c
test/channels-cornercases.c
test/channels-failure.c
test/channels-fork.c
test/channels-udp-cornercases.c
test/channels.c
test/echo-fork.c