MCPcopy Create free account
hub / github.com/ActiveState/code / read

Method read

recipes/Python/572159_SPICE/recipe-572159.py:239–250  ·  view source on GitHub ↗

Read and decrypt from socket.

(self, size=-1)

Source from the content-addressed store, hash-verified

237 return self
238
239 def read(self, size=-1):
240 'Read and decrypt from socket.'
241 if size < 0:
242 cache = ''
243 while True:
244 temp = self.recv(2 ** 10)
245 if temp:
246 cache += temp
247 else:
248 return cache
249 else:
250 return self.recv(size)
251
252 def readline(self, size=-1):
253 'Dummy attribute for cPickle.'

Callers

nothing calls this directly

Calls 1

recvMethod · 0.95

Tested by

no test coverage detected