You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a emit function. After the emit function is done, the socketCLeint gets back the ack and doesn't pass it to the call back immediately. It executes everything else and it NSLog's the ack as below. Is there any way I can wait until the acknowledgment is parsed and NSLoged and continue further? I tried adding a thread sleeper after emitting but it doesn't help. It sleeps for given time and executes everything and NSLogs the data below.
but this socketio client doesn't wait after emitWithAck. the sequence logged is
1
2
4
3
any ideas on how to make it sequentially executed? I tried dispatching a semaphore before emitWithAck and release the semaphore when we get ack for the emitWithAck, that never helped.
I have a emit function. After the emit function is done, the socketCLeint gets back the ack and doesn't pass it to the call back immediately. It executes everything else and it NSLog's the ack as below. Is there any way I can wait until the acknowledgment is parsed and NSLoged and continue further? I tried adding a thread sleeper after emitting but it doesn't help. It sleeps for given time and executes everything and NSLogs the data below.
[[socketclient emitWithAck:type with:@[payload]] timingOutAfter:0 callback:^(NSArray* data) {NSLog(@"%@", data); }];
The text was updated successfully, but these errors were encountered: