2016-06-09 29 views

回答

0

只是沒有在Python代碼正確網址注意到連接:

application = tornado.web.Application([ 
     (r"/chat", ChatHandler), 
     (r"/(.*)", tornado.web.StaticFileHandler, {"path": args.static_path, "default_filename":'index.html'}), 
]) 

所以從iOS客戶端連接的正確URL是[NSURL URLWithString:@"ws://localhost:9000/chat"]