Open PrasannaYuvitime opened 6 years ago
I am using socket.io for ios ,swift library and my socket disconnect listener not called on any auto disconnection while attempting infinite autoconnect....
self.socket = [[SocketIOClient alloc] initWithSocketURL:[NSURL URLWithString:[NSString stringWithFormat:kChatServer]] config:@{@"log": @YES,@"connectParams": @{@"Authorization":strToken}}]; self.socket.reconnects = true; self.socket.reconnectWait = 5; [self.socket connect]; //Socket disconnected [self.socket on:@"disconnect" callback:^(NSArray * arrResponce, SocketAckEmitter * ackEmit) { NSLog(@"kDisConnect called"); [[NSNotificationCenter defaultCenter] postNotificationName:kDisConnect object:arrResponce]; }]; [self.socket on:@"reconnect" callback:^(NSArray * arrResponce, SocketAckEmitter * ackEmit) { NSLog(@"reconnect socket"); }]; //Socket reconnect_attempt [self.socket on:@"reconnectAttempt" callback:^(NSArray * arrResponce, SocketAckEmitter * ackEmit) { NSLog(@"reconnect_attempt socket"); }];
@nuclearace please guide me!
I am using socket.io for ios ,swift library and my socket disconnect listener not called on any auto disconnection while attempting infinite autoconnect....
@nuclearace please guide me!