|
@@ -204,10 +204,12 @@ class Server(object):
|
|
|
|
|
|
def setup(self):
|
|
def setup(self):
|
|
"""
|
|
"""
|
|
- opens the connection and starts listening for clients. this method
|
|
|
|
- does not block, it returns after starting to listen.
|
|
|
|
|
|
+ creates a scoket, opens the connection and starts listening for
|
|
|
|
+ clients. this method does not block, it returns after starting to
|
|
|
|
+ listen.
|
|
"""
|
|
"""
|
|
- lserver.info("setting up socket")
|
|
|
|
|
|
+ lserver.info("setting up server")
|
|
|
|
+ self.socket = self.make_socket
|
|
if self.af_family == "AF_INET":
|
|
if self.af_family == "AF_INET":
|
|
self.socket.bind((self.host, self.port))
|
|
self.socket.bind((self.host, self.port))
|
|
elif self.af_family == "AF_UNIX":
|
|
elif self.af_family == "AF_UNIX":
|
|
@@ -217,7 +219,6 @@ class Server(object):
|
|
os.remove(self.host)
|
|
os.remove(self.host)
|
|
self.socket.bind(self.host)
|
|
self.socket.bind(self.host)
|
|
self.socket.listen(self.max_allowed_clients)
|
|
self.socket.listen(self.max_allowed_clients)
|
|
- # self.socket.settimeout(1)
|
|
|
|
|
|
|
|
def shutdown(self):
|
|
def shutdown(self):
|
|
"""
|
|
"""
|