summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/modwebrepl.c
Commit message (Collapse)AuthorAge
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* extmod/modwebrepl: set_password(): Raise exception for too long password.Paul Sokolovsky2016-08-16
|
* extmod/modwebrepl: Add GET_VER operation to query MicroPython version.Paul Sokolovsky2016-08-07
|
* extmod/modwebrepl: Make GET_FILE operation non-blocking.Paul Sokolovsky2016-08-05
| | | | | | 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.
* extmod/modwebrepl: Factor out "GET" iteration to write_file_chunk().Paul Sokolovsky2016-08-05
|
* extmod/modwebrepl: Use mp_stream_close() method.Paul Sokolovsky2016-07-23
|
* extmod/modwebrepl: Add readinto() method.Paul Sokolovsky2016-07-02
|
* all: Rename mp_obj_type_t::stream_p to protocol.Paul Sokolovsky2016-06-18
| | | | | It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
* extmod/modwebrepl: Add close() method.Paul Sokolovsky2016-05-20
|
* py/stream: Support both "exact size" and "one underlying call" operations.Paul Sokolovsky2016-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* extmod/modwebrepl: Get rid of using strncpy().Paul Sokolovsky2016-05-02
|
* extmod/modwebrepl: Add support for password.Paul Sokolovsky2016-04-30
| | | | Request for password then becomes mandatory part of the protocol.
* extmod/modwebrepl: Set debugging by default to off.Paul Sokolovsky2016-04-29
| | | | | That's production setting. Also, extra UART output may affect behavior of (subpar) network drivers.
* extmod/modwebrepl: Add rate-limiting workaround for broken network drivers.Paul Sokolovsky2016-04-29
| | | | Like ESP8266 has.
* extmod/modwebrepl: Use bigger socket receive buffer.Paul Sokolovsky2016-04-29
| | | | | | 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.
* extmod/modwebrepl: More detailed debug output.Paul Sokolovsky2016-04-29
| | | | So detailed that even commented by default.
* extmod/modwebrepl: GET_FILE: Send length-prefix chunk with one write().Paul Sokolovsky2016-04-29
| | | | A bit of optimization.
* extmod/modwebrepl: Keep reading data when there's something to read.Paul Sokolovsky2016-04-29
| | | | | EAGAIN should be returned only if underlying socket returned it. Wrap existing read function into external loop to process all data available.
* extmod/modwebrepl: Initial implementation of "get file" operation.Paul Sokolovsky2016-04-29
|
* extmod/modwebrepl: Module to handle WebREPL protocol.Paul Sokolovsky2016-04-29
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.