mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-06 04:21:51 +00:00
13 lines
400 B
Python
13 lines
400 B
Python
# coding=utf-8
|
|
import SocketServer
|
|
from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
|
|
from runner import JudgeInstanceRunner
|
|
|
|
|
|
class AsyncXMLRPCServer(SocketServer.ThreadingMixIn, SimpleXMLRPCServer):
|
|
pass
|
|
|
|
|
|
server = AsyncXMLRPCServer(('0.0.0.0', 8080), SimpleXMLRPCRequestHandler, allow_none=True)
|
|
server.register_instance(JudgeInstanceRunner())
|
|
server.serve_forever() |