def connect(host, port):
loop = IOLoop()
Publisher.verbose = False
Publisher.ioloop = loop
app = Application([
(r'/', Publisher)
])
app.listen(port)
url = 'ws://{}:{}'.format(host, port)
if Publisher.verbose:
print('Fake robot serving on {}'.format(url))
t = Thread(target=loop.start)
t.daemon = True
t.start()
评论列表
文章目录