@@ -82,10 +82,10 @@ def write(self, data): # pylint: disable=no-self-use
82
82
83
83
def readline (self ):
84
84
"""Attempt to return as many bytes as we can up to but not including '\r \n '"""
85
- print ("Socket readline" )
85
+ # print("Socket readline")
86
86
while b'\r \n ' not in self ._buffer :
87
87
# 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 )
89
89
if avail :
90
90
self ._buffer += _the_interface .socket_read (self ._socknum , avail )
91
91
firstline , self ._buffer = self ._buffer .split (b'\r \n ' , 1 )
@@ -95,10 +95,10 @@ def readline(self):
95
95
def read (self , size = 0 ):
96
96
"""Read up to 'size' bytes from the socket, this may be buffered internally!
97
97
If 'size' isnt specified, return everything in the buffer."""
98
- print ("Socket read" , size )
98
+ # print("Socket read", size)
99
99
if size == 0 : # read as much as we can at the moment
100
100
while True :
101
- avail = min (_the_interface .socket_available (self ._socknum ), 1500 )
101
+ avail = min (_the_interface .socket_available (self ._socknum ), 4000 )
102
102
if avail :
103
103
self ._buffer += _the_interface .socket_read (self ._socknum , avail )
104
104
else :
@@ -114,7 +114,7 @@ def read(self, size=0):
114
114
received = []
115
115
while to_read > 0 :
116
116
#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 )
118
118
if avail :
119
119
stamp = time .monotonic ()
120
120
recv = _the_interface .socket_read (self ._socknum , min (to_read , avail ))
@@ -123,7 +123,7 @@ def read(self, size=0):
123
123
gc .collect ()
124
124
if time .monotonic () - stamp > self ._timeout :
125
125
break
126
- print (received )
126
+ # print(received)
127
127
self ._buffer += b'' .join (received )
128
128
129
129
ret = None
0 commit comments