vasily-popov / VPSocketIO

socket.io client objective-c
MIT License
21 stars 12 forks source link

demo里面socket初始化方法中的config字典少个逗号~~ #1

Open Fish1992 opened 6 years ago

vasily-popov commented 6 years ago

Hi @Fish1992 , can you explain the issue. Do you need more params in config for demo?

Fish1992 commented 6 years ago

https://github.com/vascome/VPSocketIO/blob/master/VPSocketIO/ViewController.m#L71 line 71 need a comma

Fish1992 commented 6 years ago

i tried to set the namespace in config such as

socket = [[VPSocketIOClient alloc] init:[NSURL URLWithString:urlString] withConfig:@{@"log": @YES, @"nsp":@"/chatroom/", @"path":@"/websocket/", @"logger":logger }];

but it can't establish to chatroom server, can you give a demo about namespace please

vasily-popov commented 6 years ago

@Fish1992,

are you sure that you path is "/websocket" ? By default it's "/socket.io/".

can you show logs?

also tou can play with poliing and websocket params //@"forcePolling": @YES, //@"forceWebsockets":@YES

vasily-popov commented 6 years ago

@Fish1992

you can try with test server from here https://github.com/nuclearace/socket.io-client-swift-example/tree/master/server

but it does not use namespace and works with default params.