-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gio::SocketService: Add a Stream
implementation for the incoming connections
#1064
Comments
Stream
implementation for the incoming connectionsStream
implementation for the incoming connections
I think this would be similar to #431 |
Would it have to be a while let Ok(stream) = listener.accept().await {
accept_connection(stream)
} which seems more like a one-shot bridge between the signal and the async world. We can of course still have it as let incoming = service.incoming();
while let Some(stream) = incoming.next() {
accept_connection(stream)
} but it might be beneficial for it to look more like the other async world. Or it might be more beneficial to look more like other glib stuff? The underlying |
Actually async-std does provide an But while working on this it looks like a bigger issue is the inversion of control between the callback method and the Stream. On a Stream, you choose when to accept the next connection, whereas with callbacks, the The naïve implementation of passing along connections from the A more complex solution here I think would wait for a Given that "all" it does is call All this to say, it feels like |
Given #1454 is this done now? Or is there more? |
I'd say this is done now. Thanks :) |
See title
The text was updated successfully, but these errors were encountered: