Socket.IO-Client-Swift icon indicating copy to clipboard operation
Socket.IO-Client-Swift copied to clipboard

Response for the emitWithAck call taking too much time

Open DevelopscriptLLC opened this issue 9 years ago • 4 comments

I am using following method for getting acknowledgement from server.

emitWithAck(event:String, _ items:AnyObject...) -> (timeout:UInt64, callback:(NSArray?) -> Void) -> Void

Normal Response getting very quickly, But when the device is connected to some lossy networks the negative acknowledgement [ No Ack ] response taking too much time to receive. I am stuck here. Do you new methods, or methods without timeout. Please let me know. I tried with timeout value as Zero. But it does'nt work.

DevelopscriptLLC avatar Dec 16 '15 14:12 DevelopscriptLLC

A timeout of zero will be no timeout.

nuclearace avatar Dec 23 '15 15:12 nuclearace

If i give timeout value as Zero i am getting Callback. No Response at All.

DevelopscriptLLC avatar Jan 05 '16 12:01 DevelopscriptLLC

@DevelopscriptLLC How did you solve this? Thanks

pablogeek avatar Mar 29 '17 15:03 pablogeek

@pablogeek For calls like emitWithAck i am setting 0 to the parameter timeoutAfter. Anyway this is not the perfect solution. But it worked for me.

DevelopscriptLLC avatar Mar 30 '17 04:03 DevelopscriptLLC