summaryrefslogtreecommitdiff
path: root/extmod/modwebrepl.c
AgeCommit message (Collapse)Author
2017-07-29extmod/mod{lwip,onewire,webrepl}: Convert to mp_rom_map_elem_t.Paul Sokolovsky
2017-07-24all: Don't include system errno.h when it's not needed.Damien George
2017-03-29extmod: Update for changes to mp_obj_str_get_data.Damien George
2016-09-22all: Remove 'name' member from mp_obj_module_t struct.Damien George
One can instead lookup __name__ in the modules dict to get the value.
2016-08-16extmod/modwebrepl: set_password(): Raise exception for too long password.Paul Sokolovsky
2016-08-07extmod/modwebrepl: Add GET_VER operation to query MicroPython version.Paul Sokolovsky
2016-08-05extmod/modwebrepl: Make GET_FILE operation non-blocking.Paul Sokolovsky
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.
2016-08-05extmod/modwebrepl: Factor out "GET" iteration to write_file_chunk().Paul Sokolovsky
2016-07-23extmod/modwebrepl: Use mp_stream_close() method.Paul Sokolovsky
2016-07-02extmod/modwebrepl: Add readinto() method.Paul Sokolovsky
2016-06-18all: Rename mp_obj_type_t::stream_p to protocol.Paul Sokolovsky
It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
2016-05-20extmod/modwebrepl: Add close() method.Paul Sokolovsky
2016-05-18py/stream: Support both "exact size" and "one underlying call" operations.Paul Sokolovsky
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.
2016-05-02extmod/modwebrepl: Get rid of using strncpy().Paul Sokolovsky
2016-04-30extmod/modwebrepl: Add support for password.Paul Sokolovsky
Request for password then becomes mandatory part of the protocol.
2016-04-29extmod/modwebrepl: Set debugging by default to off.Paul Sokolovsky
That's production setting. Also, extra UART output may affect behavior of (subpar) network drivers.
2016-04-29extmod/modwebrepl: Add rate-limiting workaround for broken network drivers.Paul Sokolovsky
Like ESP8266 has.
2016-04-29extmod/modwebrepl: Use bigger socket receive buffer.Paul Sokolovsky
The smaller chunks we send (and receive), the more packets there to receive, and higher chance to git internal packet buffer overflow in WiFi driver.
2016-04-29extmod/modwebrepl: More detailed debug output.Paul Sokolovsky
So detailed that even commented by default.
2016-04-29extmod/modwebrepl: GET_FILE: Send length-prefix chunk with one write().Paul Sokolovsky
A bit of optimization.
2016-04-29extmod/modwebrepl: Keep reading data when there's something to read.Paul Sokolovsky
EAGAIN should be returned only if underlying socket returned it. Wrap existing read function into external loop to process all data available.
2016-04-29extmod/modwebrepl: Initial implementation of "get file" operation.Paul Sokolovsky
2016-04-29extmod/modwebrepl: Module to handle WebREPL protocol.Paul Sokolovsky
While just a websocket is enough for handling terminal part of WebREPL, handling file transfer operations requires demultiplexing and acting upon, which is encapsulated in _webrepl class provided by this module, which wraps a websocket object.