Minor cleanup of IPv6 support code.

- Use self for static method call.

- Remove extraneous spaces.
This commit is contained in:
Joel Martin 2011-07-07 11:45:19 -05:00
parent e11012437a
commit 247b74950d
2 changed files with 4 additions and 4 deletions

View File

@ -736,12 +736,12 @@ Sec-WebSocket-Accept: %s\r
is a WebSockets client then call new_client() method (which must
be overridden) for each new client connection.
"""
addr = WebSocketServer.addrinfo(self.listen_host, self.listen_port)
addr = self.addrinfo(self.listen_host, self.listen_port)
lsock = socket.socket(addr[0], addr[1])
lsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
lsock.bind((self.listen_host, self.listen_port))
lsock.listen(100)
if self.daemon:
self.daemonize(keepfd=lsock.fileno(), chdir=self.web)

View File

@ -141,10 +141,10 @@ Traffic Legend:
# Connect to the target
self.msg("connecting to: %s:%s" % (
self.target_host, self.target_port))
addr = WebSocketServer.addrinfo(self.target_host, self.target_port)
addr = self.addrinfo(self.target_host, self.target_port)
tsock = socket.socket(addr[0], addr[1])
tsock.connect((self.target_host, self.target_port))
if self.verbose and not self.daemon:
print(self.traffic_legend)