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

Method sendto

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

Encrypt and send datagram on socket.

(self, string, address, flags=0)

Source from the content-addressed store, hash-verified

221 return self.__socket.sendall(string, flags)
222
223 def sendto(self, string, address, flags=0):
224 'Encrypt and send datagram on socket.'
225 string = _encode(string, self.__em1, self.__em2)
226 sent = self.__socket.sendto(string, flags, address)
227 offset = sent % 4
228 if offset:
229 string = string[sent:][:4-offset]
230 sent += len(string)
231 while string:
232 string = string[self.socket.sentto(string, flags, address):]
233 return sent / 4
234
235 def makefile(self, mode='r', bufsize=-1):
236 'Return a file-like object.'

Callers 10

recipe-491264.pyFile · 0.45
recipe-442490.pyFile · 0.45
get_current_SNTP_timeFunction · 0.45
recipe-117211.pyFile · 0.45
wake_on_lanFunction · 0.45
recipe-52302.pyFile · 0.45
recipe-578802.pyFile · 0.45
sntp_timeFunction · 0.45
recipe-52218.pyFile · 0.45
recipe-439224.pyFile · 0.45

Calls 1

_encodeFunction · 0.70

Tested by

no test coverage detected