Too many dropped messages

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

intomo
Posts: 22
Joined: 22 Nov 2010, 21:21
Location: Los Angeles

Too many dropped messages

Postby intomo » 10 Feb 2011, 00:51

I am running a game on iPads over WIFI. The WIFI is n and plenty of bandwidth. The game runs on roomVariable updates.

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.
intomo
Posts: 22
Joined: 22 Nov 2010, 21:21
Location: Los Angeles

Postby intomo » 20 Feb 2011, 19:20

This turned out to be more of a network issue than anything else.

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 1 guest