import socket, time, interface
-i = interface.AsynchronousInterface('ecdsa.org', 50001)
+i = interface.TcpStratumInterface('ecdsa.org', 50001)
i.start()
i.send([('blockchain.numblocks.subscribe',[])])
-class HttpInterface(PollingInterface):
+class HttpStratumInterface(PollingInterface):
def poll(self):
self.send([])
-class AsynchronousInterface(Interface):
+class TcpStratumInterface(Interface):
"""json-rpc over persistent TCP connection, asynchronous"""
def __init__(self, host, port):
if protocol == 'n':
InterfaceClass = NativeInterface
elif protocol == 't':
- InterfaceClass = AsynchronousInterface
+ InterfaceClass = TcpStratumInterface
elif protocol == 'h':
- InterfaceClass = HttpInterface
+ InterfaceClass = HttpStratumInterface
else:
print "unknown protocol"
InterfaceClass = NativeInterface
import socket, time, interface
-i = interface.AsynchronousInterface('ecdsa.org', 50001)
+i = interface.TcpStratumInterface('ecdsa.org', 50001)
i.start()
i.send([('server.peers.subscribe',[])])
from version import ELECTRUM_VERSION, SEED_VERSION
-from interface import NativeInterface, AsynchronousInterface, HttpInterface, DEFAULT_SERVERS
+from interface import DEFAULT_SERVERS