summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2025-01-02 13:41:30 +0100
committerFelix Fietkau <nbd@nbd.name>2025-02-04 19:39:03 +0100
commitc0d1654a450b62f5767ebd28352141f33c7ef38e (patch)
tree50c7bc5bcd12a8a29fd26b6cd876d37c61331e83 /lib.c
parent22b9523565a5b59d98e8ba2fa578fa5d994ecfdb (diff)
ubus: add support for channels
A channel is a context that is directly connected to a peer instead of going through ubusd. The use of this context is limited to calling ubus_invoke and receiving requests not bound to any registered object. The main use case for this is having a more stateful interaction between processes. A service using channels can attach metadata to each individual channel and keep track of its lifetime, which is not possible through the regular subscribe/notify mechanism. Using channels also improves request latency, since messages are passed directly between processes. A channel can either be opened by fd using ubus.open_channel(), or created from within a request by using req.new_channel(). When calling req.new_channel, the fd for the other side of the channel is automatically passed to the remote caller. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'lib.c')
0 files changed, 0 insertions, 0 deletions