[stdlib] [proposal] When Reference and Coroutine are ready, implement safe & fully async socket package #2746
Locked
martinvuyk
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The basic Idea would be to keep as close an API to Python as possible. But we can do better and actually support async IO from the start and think of WASM and other niche use cases, without raising so much on every function call and making use of all of the power of the Mojo type system.
Every Platform would have it's own private socket implementation with the following interface (will evolve over time):
An overarching type must provide as similar an interface to Python's as possible:
Examples:
In the future something like this should be possible:
Thoughts and Questions I have for discussion
Compatibility with Python
allowing lower level control if desired for other protocols ?
Decisions on the choice of kernel IO protocols
Possible steps to approach this
(repository where I'm sketching this package out, any help implementing platform specific sockets is welcome :) )
Beta Was this translation helpful? Give feedback.
All reactions