Paul Sokolovsky
e15fb33e10
extmod/modwebrepl: Add GET_VER operation to query MicroPython version.
2016-08-07 00:01:25 +03:00
Paul Sokolovsky
cbef0dba2e
extmod/modwebsocket: Use mp_rom_map_elem_t and friends.
2016-08-06 16:18:03 +03:00
Paul Sokolovsky
e0d49b7e1b
extmod/modwebsocket: Make compatible with non-default object models.
2016-08-06 15:53:16 +03:00
Paul Sokolovsky
a931c4eeec
extmod/modwebsocket: Add readline method.
...
This goes bit against websocket nature (message-based communication),
as it ignores boundaries bertween messages, but may be very practical
to do simple things with websockets.
2016-08-06 15:13:26 +03:00
Paul Sokolovsky
d79342d33e
extmod/modbtree: open(): Add option kwargs.
...
Namely: flags, cachesize, pagesize, minkeypage.
2016-08-06 00:10:22 +03:00
Paul Sokolovsky
ed500e4987
extmod/modwebrepl: Make GET_FILE operation non-blocking.
...
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-05 22:57:50 +03:00
Paul Sokolovsky
c16612ee87
extmod/modwebrepl: Factor out "GET" iteration to write_file_chunk().
2016-08-05 22:53:10 +03:00
Paul Sokolovsky
3eb532e974
extmod/modbtree: Implement __contains__ operation.
2016-08-02 00:24:59 +03:00
Paul Sokolovsky
99061d1dcb
extmod/modbtree: Switch to accepting stream object instead of filename.
...
Requires "embedded" BerkeleyDB BTree implementation.
2016-07-31 00:40:35 +03:00
Paul Sokolovsky
4f1b0292db
py/stream: Add adapter methods with POSIX-compatible signatures.
...
Previoussly such read() and write() methods were used by modussl_axtls,
move to py/stream for reuse.
2016-07-30 00:25:06 +03:00
Paul Sokolovsky
25df419c67
extmod/modbtree: Check __bt_open() return value for error.
2016-07-24 00:29:32 +03:00
Paul Sokolovsky
2dd21d9a68
extmod/modwebrepl: Use mp_stream_close() method.
2016-07-23 00:52:35 +03:00
Paul Sokolovsky
a53e0e59f3
extmod/modussl_axtls: Use mp_stream_close() method.
2016-07-23 00:38:56 +03:00
Paul Sokolovsky
0a6f599cf2
extmod/vfs_fat: Implement rmdir() method.
...
Shares the code with remove() method due to the same underlying f_unlink()
FatFs operation.
2016-07-16 03:46:42 +03:00
Paul Sokolovsky
780114e398
extmod/modussl_axtls: Add dummy setblocking() method.
...
Accepts only value of True.
2016-07-15 01:05:06 +03:00
Paul Sokolovsky
20283aec10
extmod/modussl_axtls: Further changes to allow alternative SSL modules.
...
Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls
and link with -laxtls.
2016-07-13 01:49:38 +03:00
Paul Sokolovsky
e32d1e17bb
extmod/modussl: Rename to modussl_axtls.c, to allow impl using other SSL libs.
2016-07-13 01:35:59 +03:00
Paul Sokolovsky
a4c8a1ffe8
extmod/moduos_dupterm: Reuse dupterm_arr_obj for write operations.
...
Instead of allocating new array object header again and again, causing
memory fragmentation.
2016-07-07 02:16:24 +03:00
Paul Sokolovsky
426112ce88
extmod/moduos_dupterm: Reserve buffer bytearray object for dupterm.
...
Allocating it for each read/write operation is a memory fragmentation
hazard.
2016-07-04 13:32:30 +03:00
Paul Sokolovsky
417dc0c05d
extmod/modbtree: Fixes for nanbox build.
2016-07-02 15:58:13 +03:00
Paul Sokolovsky
b09cd0e1ec
extmod/modbtree: Fix unused argument warning.
2016-07-02 15:21:54 +03:00
Paul Sokolovsky
c880f91ac0
extmod/modwebrepl: Add readinto() method.
2016-07-02 14:05:37 +03:00
Paul Sokolovsky
03b0279c6d
extmod/modwebsocket: Add readinto() method.
2016-07-02 14:03:49 +03:00
Paul Sokolovsky
2f7ebf16de
extmod/modbtree: Cleverly implement "for key in btree:" syntax.
...
I.e. make it work like btree.keys(), while still not using a separate
iterator type.
2016-06-23 20:08:37 +03:00
Paul Sokolovsky
6b088a671a
extmod/modbtree: Implement keys(), values(), items() iterators.
...
Each takes optional args of starting key, ending key, and flags (ending
key inclusive, reverse order).
2016-06-20 15:50:31 +03:00