MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / server_bind

Method server_bind

service/server.py:63–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61# http://code.activestate.com/recipes/425210-simple-stoppable-server-using-socket-timeout/
62class StoppableHTTPServer(socketserver.TCPServer):
63 def server_bind(self):
64 # Can't use HTTPServer due to reliance on socket.getfqdn() which seems to be bugged.
65 # See https://github.com/pyfa-org/Pyfa/issues/1560#issuecomment-390095101
66 socketserver.TCPServer.server_bind(self)
67 host, port = self.server_address[:2]
68 self.server_name = host
69 self.server_port = port
70
71 # self.settings = CRESTSettings.getInstance()
72
73 self.socket.settimeout(1)
74 self.run = True
75
76 def get_request(self):
77 while self.run:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected