-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
The road to zig std #21
Comments
This is already the case, if I'm not mistaken (well, not completely on windows, I believe interacting with AFD is necessary for async connect, bind etc.)
I am not familiar with unix sockets tbh, I will look at examples and differences with other sockets and come back to this issue.
On windows, I intentionally made the socket set reallocate to support an arbitrary number of sockets. |
I feel the API should be flexible enough to enable integration with Unix sockets at one point. I believe, however, that Unix sockets are out of scope as of now as I see it as a separate thing (Only current device, rather than over the network like TCP/UDP). It's easier to get things merged if the steps we take are small. Personally, I don't mind the polling API to have allocations as I can imagine the user not always knowing how many it will open (at comptime). I do realize, however, that I come from a desktop/server view, and haven't given it much thought from an embedded viewpoint. Perhaps we could make the API flexible enough to allow for both? I thought of making the polling function accept a slice, but that would require the user to create the sockets themselves which is a pity. Probably what Alex suggested sounds pretty doable. I think the best way to get this into std, is by making a PR sooner rather than later and get feedback that way. I'm sure a lot of people will have opinions to share on how to go further. (Especially since they most definitely have more experience than me). |
Yo, I just want to point out that there are a few people operating in this space at the moment and that I think making API decisions is a non-trivial problem that requires to coordinate & communicate effectively. You already correctly identified LemonBoy's effort, on top of that there's also @lithdew who is working on a bunch of async APIs for windows, both network and filesystem IIRC, and he also plans to upstream some code. Please pay attention to his effort too, there's an ongoing discussion in #windows-evented-io (in the showtime discord). Unfortunately at the moment I can't provide better support or advice than this, as I'm focusing on the website + showtime, but I'm happy to help with specific issues with a well-defined scope, just ping me in case. |
Yes, I will be looking into pike's AFD code for sure, seems interesting. |
Will this be achieved? zig-network could be amazing in stdlib... |
There are plans to upstream this library into the zig std library. This issue is here to create a concrete plan and track progress.
Some considerations:
zig-network
errorsRoadmap:
ping @alexnask @Luukdegram @kristoff-it
The text was updated successfully, but these errors were encountered: