<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/extmod/modwebrepl.c, branch esp-extra-scripts</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=esp-extra-scripts</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=esp-extra-scripts'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-08-06T21:01:25+00:00</updated>
<entry>
<title>extmod/modwebrepl: Add GET_VER operation to query MicroPython version.</title>
<updated>2016-08-06T21:01:25+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-08-06T21:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e15fb33e109983ced35f14c674e0aa1d47dbc357'/>
<id>urn:sha1:e15fb33e109983ced35f14c674e0aa1d47dbc357</id>
<content type='text'>
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Make GET_FILE operation non-blocking.</title>
<updated>2016-08-05T19:57:50+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-08-05T19:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ed500e49878292c87cd68b8fcfd842f70201eb2d'/>
<id>urn:sha1:ed500e49878292c87cd68b8fcfd842f70201eb2d</id>
<content type='text'>
In the sense that while GET_FILE transfers its data, REPL still works.
This is done by requiring client to send 1-byte block before WebREPL
server transfers next block of data.
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Factor out "GET" iteration to write_file_chunk().</title>
<updated>2016-08-05T19:53:10+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-08-05T19:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c16612ee87e2f3c58ef26031dc04b689da772c51'/>
<id>urn:sha1:c16612ee87e2f3c58ef26031dc04b689da772c51</id>
<content type='text'>
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Use mp_stream_close() method.</title>
<updated>2016-07-22T21:52:35+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-22T21:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2dd21d9a68ef90bd42fa355a744dde89031611c1'/>
<id>urn:sha1:2dd21d9a68ef90bd42fa355a744dde89031611c1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Add readinto() method.</title>
<updated>2016-07-02T11:05:37+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-02T11:05:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c880f91ac0d5157c23a78e5e9739388b57419e5d'/>
<id>urn:sha1:c880f91ac0d5157c23a78e5e9739388b57419e5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Rename mp_obj_type_t::stream_p to protocol.</title>
<updated>2016-06-18T15:44:57+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-06-18T15:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=07209f8592f15435d6abbccaad5347cea2c7722e'/>
<id>urn:sha1:07209f8592f15435d6abbccaad5347cea2c7722e</id>
<content type='text'>
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Add close() method.</title>
<updated>2016-05-20T18:32:41+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-05-20T18:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3a29db8e58d963747697025e847444430c9f8b9e'/>
<id>urn:sha1:3a29db8e58d963747697025e847444430c9f8b9e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/stream: Support both "exact size" and "one underlying call" operations.</title>
<updated>2016-05-17T23:41:45+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-05-17T23:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f7c84b10a5f3b2f783955b01f55e0f913ac459f'/>
<id>urn:sha1:7f7c84b10a5f3b2f783955b01f55e0f913ac459f</id>
<content type='text'>
Both read and write operations support variants where either a) a single
call is made to the undelying stream implementation and returned buffer
length may be less than requested, or b) calls are repeated until requested
amount of data is collected, shorter amount is returned only in case of
EOF or error.

These operations are available from the level of C support functions to be
used by other C modules to implementations of Python methods to be used in
user-facing objects.

The rationale of these changes is to allow to write concise and robust
code to work with *blocking* streams of types prone to short reads, like
serial interfaces and sockets. Particular object types may select "exact"
vs "once" types of methods depending on their needs. E.g., for sockets,
revc() and send() methods continue to be "once", while read() and write()
thus converted to "exactly" versions.

These changes don't affect non-blocking handling, e.g. trying "exact"
method on the non-blocking socket will return as much data as available
without blocking. No data available is continued to be signaled as None
return value to read() and write().

From the point of view of CPython compatibility, this model is a cross
between its io.RawIOBase and io.BufferedIOBase abstract classes. For
blocking streams, it works as io.BufferedIOBase model (guaranteeing
lack of short reads/writes), while for non-blocking - as io.RawIOBase,
returning None in case of lack of data (instead of raising expensive
exception, as required by io.BufferedIOBase). Such a cross-behavior
should be optimal for MicroPython needs.
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Get rid of using strncpy().</title>
<updated>2016-05-02T17:52:34+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-05-02T17:52:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b8468d12a1a35eececff6432349dc0f66b10d3dd'/>
<id>urn:sha1:b8468d12a1a35eececff6432349dc0f66b10d3dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>extmod/modwebrepl: Add support for password.</title>
<updated>2016-04-30T17:36:32+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-04-29T21:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=859e4e94f3f3f69e00c8b8c910461fa036eaf649'/>
<id>urn:sha1:859e4e94f3f3f69e00c8b8c910461fa036eaf649</id>
<content type='text'>
Request for password then becomes mandatory part of the protocol.
</content>
</entry>
</feed>
