Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit a931c4e

Browse files
author
Paul Sokolovsky
committed
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.
1 parent 3d19adf commit a931c4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extmod/modwebsocket.c

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(websocket_close_obj, websocket_close);
283283
STATIC const mp_map_elem_t websocket_locals_dict_table[] = {
284284
{ MP_OBJ_NEW_QSTR(MP_QSTR_read), (mp_obj_t)&mp_stream_read_obj },
285285
{ MP_OBJ_NEW_QSTR(MP_QSTR_readinto), (mp_obj_t)&mp_stream_readinto_obj },
286+
{ MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj },
286287
{ MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj },
287288
{ MP_OBJ_NEW_QSTR(MP_QSTR_ioctl), (mp_obj_t)&mp_stream_ioctl_obj },
288289
{ MP_OBJ_NEW_QSTR(MP_QSTR_close), (mp_obj_t)&websocket_close_obj },

0 commit comments

Comments
 (0)