Attention is currently required from: arehbein, laforge, pespin.

daniel 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:
> Internally, the osmo_stream code calls the read_cb() if non NULL, or/and the 
> iofd_read_cb() if not NULL (the only difference afaiu is the extra msg ptr 
> being passed).

I really don't like the and/or here since the difference is read_cb() will need 
to read from the fd itself and iofd does it for you. So there can only ever be 
an XOR relationship between these. I'd go as far as (if we went for this API) 
to assert that you never call the new api on a conn created with the old one.

Since we need to stay backwards compatible with the old API we need to keep the 
old functions:

osmo_stream_cli_create(), osmo_stream_cli_set_read_cb(), 
osmo_stream_srv_create()

New functions using osmo_io would then be:

* osmo_stream_cli_create2() with name param
* osmo_stream_cli_set_iofd_read_cb() (?)
* osmo_stream_srv_create2() with name param and no function pointers
* osmo_stream_srv_set_iofd_read_cb() (could be just read_cb, but would be 
confusing as the client already has that)
* osmo_stream_srv_set_closed_cb()



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33193
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I2f52c7107c392b6f4b0bf2a84f8c873c084a200c
Gerrit-Change-Number: 33193
Gerrit-PatchSet: 6
Gerrit-Owner: arehbein <arehb...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-CC: daniel <dwillm...@sysmocom.de>
Gerrit-CC: pespin <pes...@sysmocom.de>
Gerrit-Attention: arehbein <arehb...@sysmocom.de>
Gerrit-Attention: laforge <lafo...@osmocom.org>
Gerrit-Attention: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Thu, 08 Jun 2023 15:25:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <lafo...@osmocom.org>
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to