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

Method __str__

gunicorn/sock.py:84–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82 FAMILY = socket.AF_INET
83
84 def __str__(self):
85 if self.conf.is_ssl:
86 scheme = "https"
87 else:
88 scheme = "http"
89
90 addr = self.sock.getsockname()
91 return "%s://%s:%d" % (scheme, addr[0], addr[1])
92
93 def set_options(self, sock, bound=False):
94 sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

Callers

nothing calls this directly

Calls 1

getsocknameMethod · 0.45

Tested by

no test coverage detected