Attention is currently required from: arehbein, laforge, pespin.
1 comment:
Patchset:
>The problem I see is: How would you handle compatibility with old code that registers a read_cb? T […]
Some more open questions:
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.
osmo_stream_srv_create2 is called with the newly accept()ed fd so I'd still pass the read/close callbacks in create2().
Otherwise the code would look like this:
```
accept_cb(link, fd) {
srv = osmo_stream_srv_create2(ctx, "Connection", link, fd);
osmo_stream_srv_set_read_cb(srv, read_cb);
osmo_stream_srv_set_close_cb(srv, close_cb);
// Somehow we need to signal that the callbacks are set and we are ready to read data
osmo_stream_srv_open(srv);
}
```
To view, visit change 33193. To unsubscribe, or for help writing mail filters, visit settings.