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

Method makeSocket

Lib/logging/handlers.py:581–596  ·  view source on GitHub ↗

A factory method which allows subclasses to define the precise type of socket they want.

(self, timeout=1)

Source from the content-addressed store, hash-verified

579 self.retryFactor = 2.0
580
581 def makeSocket(self, timeout=1):
582 """
583 A factory method which allows subclasses to define the precise
584 type of socket they want.
585 """
586 if self.port is not None:
587 result = socket.create_connection(self.address, timeout=timeout)
588 else:
589 result = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
590 result.settimeout(timeout)
591 try:
592 result.connect(self.address)
593 except OSError:
594 result.close() # Issue 19182
595 raise
596 return result
597
598 def createSocket(self):
599 """

Callers 1

createSocketMethod · 0.95

Calls 5

socketMethod · 0.80
create_connectionMethod · 0.45
settimeoutMethod · 0.45
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected