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

Method send

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

Encrypt and send on socket.

(self, string, flags=0)

Source from the content-addressed store, hash-verified

204 return string, address
205
206 def send(self, string, flags=0):
207 'Encrypt and send on socket.'
208 string = _encode(string, self.__em1, self.__em2)
209 sent = self.__socket.send(string, flags)
210 offset = sent % 4
211 if offset:
212 string = string[sent:][:4-offset]
213 sent += len(string)
214 while string:
215 string = string[self.__socket.send(string, flags):]
216 return sent / 4
217
218 def sendall(self, string, flags=0):
219 'Encrypt and send all on socket.'

Callers

nothing calls this directly

Calls 1

_encodeFunction · 0.70

Tested by

no test coverage detected