File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,6 +148,9 @@ STATIC mp_obj_t socket_accept(mp_obj_t self_in) {
148148}
149149STATIC MP_DEFINE_CONST_FUN_OBJ_1 (socket_accept_obj , socket_accept );
150150
151+ // Note: besides flag param, this differs from read() in that
152+ // this does not swallow blocking errors (EAGAIN, EWOULDBLOCK) -
153+ // these would be thrown as exceptions.
151154STATIC mp_obj_t socket_recv (uint n_args , const mp_obj_t * args ) {
152155 mp_obj_socket_t * self = args [0 ];
153156 int sz = MP_OBJ_SMALL_INT_VALUE (args [1 ]);
@@ -166,6 +169,9 @@ STATIC mp_obj_t socket_recv(uint n_args, const mp_obj_t *args) {
166169}
167170STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (socket_recv_obj , 2 , 3 , socket_recv );
168171
172+ // Note: besides flag param, this differs from write() in that
173+ // this does not swallow blocking errors (EAGAIN, EWOULDBLOCK) -
174+ // these would be thrown as exceptions.
169175STATIC mp_obj_t socket_send (uint n_args , const mp_obj_t * args ) {
170176 mp_obj_socket_t * self = args [0 ];
171177 int flags = 0 ;
You can’t perform that action at this time.
0 commit comments