MCPcopy Index your code
hub / github.com/python/cpython / send

Method send

Lib/logging/handlers.py:630–647  ·  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

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

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