aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStanislav Ochotnicky <sochotnicky@gmail.com>2009-07-30 14:12:47 +0200
committerStanislav Ochotnicky <sochotnicky@gmail.com>2009-07-30 14:12:47 +0200
commita89b8d3bc2100ed264f4a993dc40e27b6e4dc7c8 (patch)
tree1acd0cd1232341b4327259d3ebcbd43daa71931b /src
parentReset FileHandler when calling init_logging (diff)
downloadcollagen-a89b8d3bc2100ed264f4a993dc40e27b6e4dc7c8.tar.gz
collagen-a89b8d3bc2100ed264f4a993dc40e27b6e4dc7c8.tar.bz2
collagen-a89b8d3bc2100ed264f4a993dc40e27b6e4dc7c8.zip
Added ip address/port to client handler context
Diffstat (limited to 'src')
-rw-r--r--src/matchbox/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/matchbox/__init__.py b/src/matchbox/__init__.py
index de8de41..80b8f4f 100644
--- a/src/matchbox/__init__.py
+++ b/src/matchbox/__init__.py
@@ -34,7 +34,7 @@ class MatchboxServer(object):
while 1:
client_socket, address = self.sock.accept()
print "connection from: ", address
- thread.start_new_thread(self.client_handler, (client_socket,))
+ thread.start_new_thread(self.client_handler, (client_socket, address))
def stop_server(self):
if self.sock:
@@ -43,7 +43,7 @@ class MatchboxServer(object):
- def client_handler(self, client_socket):
+ def client_handler(self, client_socket, client_address):
while 1:
buffer = client_socket.recv(4096)
data = ""