summaryrefslogtreecommitdiffstats
path: root/module/remote/ClientSocket.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/ClientSocket.py')
-rw-r--r--module/remote/ClientSocket.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/module/remote/ClientSocket.py b/module/remote/ClientSocket.py
new file mode 100644
index 000000000..74f66f0be
--- /dev/null
+++ b/module/remote/ClientSocket.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# -'- coding: utf-8 -*.
+"""
+authored by: RaNaN
+
+socket for connecting to the core's server
+
+"""
+import asynchat
+import socket
+from RequestHandler import RequestHandler
+
+class ClientSocket(asynchat.async_chat):
+ def __init__(self, client):
+ asynchat.async_chat.__init__(self)
+ self.client = client
+ self.data = ""
+ self.handler = RequestHandler(None)
+ self.set_terminator("\n")
+ self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+
+ def handle_connect(self):
+ print "connected"
+
+ def collect_incoming_data(self, data):
+ self.data += data
+
+ def found_terminator(self):
+ pass
+ #process