@@ -144,7 +144,6 @@ def connect(self, address, conntype=None):
144
144
assert conntype != 0x03 , "Error: SSL/TLS is not currently supported by CircuitPython."
145
145
host , port = address
146
146
147
- print (address )
148
147
if hasattr (host , 'split' ):
149
148
host = tuple (map (int , host .split ('.' )))
150
149
if not _the_interface .socket_connect (self .socknum , host , port , conn_mode = self ._sock_type ):
@@ -165,7 +164,7 @@ def recv(self, bufsize=0): #pylint: disable=too-many-branches
165
164
"""Reads some bytes from the connected remote address.
166
165
:param int bufsize: Maximum number of bytes to receive.
167
166
"""
168
- print ("Socket read" , bufsize )
167
+ # print("Socket read", bufsize)
169
168
if bufsize == 0 :
170
169
# read everything on the socket
171
170
while True :
@@ -191,27 +190,23 @@ def recv(self, bufsize=0): #pylint: disable=too-many-branches
191
190
to_read = bufsize - len (self ._buffer )
192
191
received = []
193
192
while to_read > 0 :
194
- print ("Bytes to read:" , to_read )
193
+ # print("Bytes to read:", to_read)
195
194
if self ._sock_type == SOCK_STREAM :
196
195
avail = self .available ()
197
196
elif self ._sock_type == SOCK_DGRAM :
198
197
avail = _the_interface .udp_remaining ()
199
- #print('Bytes Avail: ', avail)
200
198
if avail :
201
199
stamp = time .monotonic ()
202
200
if self ._sock_type == SOCK_STREAM :
203
- print ("to_read: {}\n avail:{}\n " .format (to_read , avail ))
204
201
recv = _the_interface .socket_read (self .socknum , min (to_read , avail ))[1 ]
205
202
elif self ._sock_type == SOCK_DGRAM :
206
203
recv = _the_interface .read_udp (self .socknum , min (to_read , avail ))[1 ]
207
- print ('RCV: ' , recv )
208
204
recv = bytes (recv )
209
205
received .append (recv )
210
206
to_read -= len (recv )
211
207
gc .collect ()
212
208
if self ._timeout > 0 and time .monotonic () - stamp > self ._timeout :
213
209
break
214
- print ("{}, \n Type:{}" .format (received , type (received )))
215
210
self ._buffer += b'' .join (received )
216
211
217
212
ret = None
0 commit comments