nuclearace / Socket.IO-Client-Swift

socket.io-client for Swift
Other
361 stars 53 forks source link

Response for the emitWithAck call taking too much time #100

Open DevelopscriptLLC opened 8 years ago

DevelopscriptLLC commented 8 years ago

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.

nuclearace commented 8 years ago

A timeout of zero will be no timeout.

DevelopscriptLLC commented 8 years ago

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

pablogeek commented 7 years ago

@DevelopscriptLLC How did you solve this? Thanks

DevelopscriptLLC commented 7 years ago

@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.