[英]Can't run sample code with TestChat from SocketRocket
I'm launching python server, seems it's working OK, but I can't connect to it from iOS TestChat and I'm receiving Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
我正在启动python服务器,看来它工作正常,但无法从iOS TestChat连接到它,并且收到
Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
Just didn't noticed in python code right URL to connect: 只是没有注意到在python代码中正确的URL连接:
application = tornado.web.Application([
(r"/chat", ChatHandler),
(r"/(.*)", tornado.web.StaticFileHandler, {"path": args.static_path, "default_filename":'index.html'}),
])
So the right URL to connect from iOS client is [NSURL URLWithString:@"ws://localhost:9000/chat"]
因此从iOS客户端连接的正确URL是
[NSURL URLWithString:@"ws://localhost:9000/chat"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.