Attention is currently required from: arehbein, laforge, daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33193 )
Change subject: Add osmo_io support to osmo_stream_cli and osmo_stream_srv ......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS5:
Since we already have osmo_stream_*_get_ofd() we should add osmo_stream_*_get_iofd(). Since they will return pointer we could simply return NULL if it's called with the wrong mode, but maybe an assert is better.
The question here would be: do we really need that API for iofd? or iofd can be handled totally internally?
osmo_stream_srv_create2 is called with the newly accept()ed fd so I'd still pass the read/close callbacks in create2().
I'd keep setting the callbacks as separate APIs. Yes, it does 2 function calls more, occupies 2 more lines, but if we had done this already in the past then now we wouldn't need to be changing this osmo_stream_srv_create() API in first place... so learning for errors = adding separate setter APIs.