File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed 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) {
148
148
}
149
149
STATIC MP_DEFINE_CONST_FUN_OBJ_1 (socket_accept_obj , socket_accept );
150
150
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.
151
154
STATIC mp_obj_t socket_recv (uint n_args , const mp_obj_t * args ) {
152
155
mp_obj_socket_t * self = args [0 ];
153
156
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) {
166
169
}
167
170
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (socket_recv_obj , 2 , 3 , socket_recv );
168
171
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.
169
175
STATIC mp_obj_t socket_send (uint n_args , const mp_obj_t * args ) {
170
176
mp_obj_socket_t * self = args [0 ];
171
177
int flags = 0 ;
You can’t perform that action at this time.
0 commit comments