add server info command. send command line commands with tcp instead of http
[electrum-server.git] / transports / stratum_tcp.py
index ab6c5c3..bd7cdae 100644 (file)
@@ -4,15 +4,15 @@ import threading
 import time
 import Queue as queue
 
-from processor import Session, Dispatcher
+from processor import Session, Dispatcher, timestr
 
 class TcpSession(Session):
 
     def __init__(self, connection, address):
-        self._connection = connection
-        self.address = address
         Session.__init__(self)
-        print "New session", address
+        self._connection = connection
+        self.address = address[0]
+        self.name = "TCP session"
 
     def connection(self):
         if self.stopped():
@@ -22,7 +22,7 @@ class TcpSession(Session):
 
     def stop(self):
         self._connection.close()
-        print "Terminating connection:", self.address[0]
+        #print "Terminating connection:", self.address
         with self.lock:
             self._stopped = True