![](/img/trans.png)
[英]Can't run Lister app sample code (Swift) from Apple's website
[英]Can't run sample code with TestChat from SocketRocket
我正在启动python服务器,看来它工作正常,但无法从iOS TestChat连接到它,并且收到Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
只是没有注意到在python代码中正确的URL连接:
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"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.