Browse Source

multithreaded

283
ThomasV 13 years ago
parent
commit
3203dc0934
  1. 4
      server/server.py

4
server/server.py

@ -654,8 +654,10 @@ def irc_thread():
def jsonrpc_thread(store):
# see http://code.google.com/p/jsonrpclib/
from SocketServer import ThreadingMixIn
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer
server = SimpleJSONRPCServer(('localhost', 8080))
class SimpleThreadedJSONRPCServer(ThreadingMixIn, SimpleJSONRPCServer): pass
server = SimpleThreadedJSONRPCServer(('localhost', 8080))
server.register_function(lambda : peer_list.values(), 'peers')
server.register_function(cmd_stop, 'stop')
server.register_function(cmd_load, 'load')

Loading…
Cancel
Save