@@ -82,10 +82,10 @@ def write(self, data): # pylint: disable=no-self-use
8282
8383 def readline (self ):
8484 """Attempt to return as many bytes as we can up to but not including '\r \n '"""
85- print ("Socket readline" )
85+ # print("Socket readline")
8686 while b'\r \n ' not in self ._buffer :
8787 # there's no line already in there, read some more
88- avail = min (_the_interface .socket_available (self ._socknum ), 1500 )
88+ avail = min (_the_interface .socket_available (self ._socknum ), 4000 )
8989 if avail :
9090 self ._buffer += _the_interface .socket_read (self ._socknum , avail )
9191 firstline , self ._buffer = self ._buffer .split (b'\r \n ' , 1 )
@@ -95,10 +95,10 @@ def readline(self):
9595 def read (self , size = 0 ):
9696 """Read up to 'size' bytes from the socket, this may be buffered internally!
9797 If 'size' isnt specified, return everything in the buffer."""
98- print ("Socket read" , size )
98+ # print("Socket read", size)
9999 if size == 0 : # read as much as we can at the moment
100100 while True :
101- avail = min (_the_interface .socket_available (self ._socknum ), 1500 )
101+ avail = min (_the_interface .socket_available (self ._socknum ), 4000 )
102102 if avail :
103103 self ._buffer += _the_interface .socket_read (self ._socknum , avail )
104104 else :
@@ -114,7 +114,7 @@ def read(self, size=0):
114114 received = []
115115 while to_read > 0 :
116116 #print("Bytes to read:", to_read)
117- avail = min (_the_interface .socket_available (self ._socknum ), 1500 )
117+ avail = min (_the_interface .socket_available (self ._socknum ), 4000 )
118118 if avail :
119119 stamp = time .monotonic ()
120120 recv = _the_interface .socket_read (self ._socknum , min (to_read , avail ))
@@ -123,7 +123,7 @@ def read(self, size=0):
123123 gc .collect ()
124124 if time .monotonic () - stamp > self ._timeout :
125125 break
126- print (received )
126+ # print(received)
127127 self ._buffer += b'' .join (received )
128128
129129 ret = None
0 commit comments