MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / send

Method send

tools/python-3.11.9-amd64/Lib/logging/handlers.py:608–625  ·  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

606 self.retryTime = now + self.retryPeriod
607
608 def send(self, s):
609 """
610 Send a pickled string to the socket.
611
612 This function allows for partial sends which can happen when the
613 network is busy.
614 """
615 if self.sock is None:
616 self.createSocket()
617 #self.sock can be None either because we haven't reached the retry
618 #time yet, or because we have reached the retry time and retried,
619 #but are still unable to connect.
620 if self.sock:
621 try:
622 self.sock.sendall(s)
623 except OSError: #pragma: no cover
624 self.sock.close()
625 self.sock = None # so we can call createSocket next time
626
627 def makePickle(self, record):
628 """

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