To use address as returned by getaddrinfo(), we should create a socket
compatible with address family, etc., returned by the same call alongside
the address itself.
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.
Ref: https://github.com/micropython/micropython-lib/issues/247
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.
Ref: https://github.com/micropython/micropython-lib/issues/247
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.
Ref: https://github.com/micropython/micropython-lib/issues/247
Arguments whose values are the default are not passed to ussl, because
many arguments are not accepted by current ussl implementations, even
if the desired behavior is the same as when they are omitted.
This also adds CancelledError exception and makes TimeoutError be a
subclass of it. As well as adds default exception handler for it in
the eventloop (which just skips re-adding this coro to the scheduling
queue, as expected).
This module implements "Sans I/O" approach, where packets are created/
parsed using BytesIO objects, and all networking happens outside the
module.
The module implements enough functionality to resolve a domain name
into IP address, for both IPv4 and IPv6.
Other DNS functionality is outside the scope of this module, that's
why it's called *u*dnspkt.
The API is experimental and subject to change.
This module requires .readbin()/.writebin() methods on a stream.
Don't have any wrapper classes for UDP socket, instead just have top-level
coroutines, taking raw socket as an argument:
s.recv(1500) => await uasyncio.udp.recv(s, 1500)
Coros which are passed to .add_reader()/.add_writer() are marked as
I/O-bound using .pend_throw(False). Before scheduling it for normal
execution again, we need to unmark it with .pend_throw(None).
Coros which removed from normal scheduling queue (and possibly put into
another queue, like I/O queue here) are marked with .pend_throw(False).
If wait_for() cancels such a coro, it is explicitly scheduled for execution,
so they actually could process pending exception (coro's exception handler
should take care of removing it from another queue and related clean up).
Unlike optimize_upip, which instantiates a separate distutils/setuptools
command to run after "sdist", sdist_upip overrides "sdist" implementation,
so it simplifies publishing workflow (no need to run adhoc commands).
Besides what optimize_upip did (post-porocessing to remove superfluous
files and recompressing with gzip 4K dictionary), sdist_upip also
adds pre-processing step of generation resource module (R.py) from
resource files.
So, now there's a single (and standard) command to generate a distrubution
package for MicroPython.
It performs handshake in blocking manner, hopes that writes
work without short writes, and hopes that non-blocking read
is implemented properly by ussl module (there're known issues
with axTLS module for example).