Here is how I set my roomVariables. This only happens every few minutes. This is only done on one client sending out to a group of 80.
Code: Select all
NSString *msg = [NSString stringWithFormat:@"%d%@%@",[[self model]slideNum],@"|",[[self model]slideDirection]];
INFSmartFoxRoomVariable *roomVar = [INFSmartFoxRoomVariable roomVariableWithString:@"slide" value:msg];
[[self smartFox] setRoomVariables:[NSArray arrayWithObjects:roomVar, nil] roomId:[[self smartFox]activeRoomId] setOwnership:false];
The receiving clients receive this:
Code: Select all
NSArray *valueArray = [slide componentsSeparatedByString:@"|"];
//NSLog(@"roomVariables %s %@%@",__FUNCTION__,[valueArray objectAtIndex:0],[valueArray objectAtIndex:1]);
[[self model]setSlideDirection:[valueArray objectAtIndex:1]];
[[self model]setSlideNum:[[valueArray objectAtIndex:0] integerValue]];
All works well normally. However, if no message is sent for a long time, some receiving clients no longer receive the message. When I look at the logs it says client disconnected due to too many dropped messages.
Is there anything I'm doing wrong?
Any suggestion on what would be more sustainable?
Would I be better off with the sending client sending publicMessages instead of setting roomVariables?
BTW, I've set the config so the deadzonepolicy is normal.
Also the MaxUserIdleTime is set high.
Also, I have a ping function on a timer that pings the server with roundTripBench every 5 minutes to keep the connection alive.
Suggestions or corrections would be welcome.
Thanks in advance.