MCPcopy
hub / github.com/benoitc/gunicorn / __init__

Method __init__

gunicorn/sock.py:21–34  ·  view source on GitHub ↗
(self, address, conf, log, fd=None)

Source from the content-addressed store, hash-verified

19class BaseSocket:
20
21 def __init__(self, address, conf, log, fd=None):
22 self.log = log
23 self.conf = conf
24
25 self.cfg_addr = address
26 if fd is None:
27 sock = socket.socket(self.FAMILY, socket.SOCK_STREAM)
28 bound = False
29 else:
30 sock = socket.fromfd(fd, self.FAMILY, socket.SOCK_STREAM)
31 os.close(fd)
32 bound = True
33
34 self.sock = self.set_options(sock, bound=bound)
35
36 def __str__(self):
37 return "<socket %d>" % self.sock.fileno()

Callers 1

__init__Method · 0.45

Calls 2

set_optionsMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected