MCPcopy Index your code
hub / github.com/RustPython/RustPython / send

Method send

Lib/logging/handlers.py:626–643  ·  view source on GitHub ↗

Send a pickled string to the socket. This function allows for partial sends which can happen when the network is busy.

(self, s)

Source from the content-addressed store, hash-verified

624 self.retryTime = now + self.retryPeriod
625
626 def send(self, s):
627 """
628 Send a pickled string to the socket.
629
630 This function allows for partial sends which can happen when the
631 network is busy.
632 """
633 if self.sock is None:
634 self.createSocket()
635 #self.sock can be None either because we haven't reached the retry
636 #time yet, or because we have reached the retry time and retried,
637 #but are still unable to connect.
638 if self.sock:
639 try:
640 self.sock.sendall(s)
641 except OSError: #pragma: no cover
642 self.sock.close()
643 self.sock = None # so we can call createSocket next time
644
645 def makePickle(self, record):
646 """

Callers 3

emitMethod · 0.95
emitMethod · 0.45
emitMethod · 0.45

Calls 3

createSocketMethod · 0.95
sendallMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected