Forum Multiplayer Multiple connections from the same IP?

Discussion and help relating to the PlayerIO Multiplayer API.

Multiple connections from the same IP?

Postby EgoAnt » February 10th, 2010, 10:14 pm

For some reason when I try to test 2 swfs running on my local machine to simulate two players they time out really quickly (about 30 seconds) and get booted. Is there something checking to make sure two players don't log in from the same IP?
User avatar
EgoAnt
 
Posts: 23
Joined: February 2nd, 2010, 5:01 am
Location: Edmonton, AB

Re: Multiple connections from the same IP?

Postby mjdeslon » February 11th, 2010, 4:32 am

I have not had that issue...might be a setting somewhere....
User avatar
mjdeslon
 
Posts: 40
Joined: February 4th, 2010, 8:16 am
Location: Missouri

Re: Multiple connections from the same IP?

Postby EgoAnt » February 11th, 2010, 5:05 am

It looks like some sort of automatic timeout. During the game, I might have to send a keep-alive message every so often, maybe that will keep it from happening. Here is a video of it happening: http://screenr.com/q8x (It's a pretty boring video, but one player drops at 1:18. The other one stays in until the end of the video.
User avatar
EgoAnt
 
Posts: 23
Joined: February 2nd, 2010, 5:01 am
Location: Edmonton, AB

Re: Multiple connections from the same IP?

Postby Oliver » February 11th, 2010, 11:26 am

I'll have a developer look at and do some debugging this week.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Multiple connections from the same IP?

Postby Oliver » February 12th, 2010, 12:03 pm

Hi

This is the feedback from the developer i asked to look into it:

The guess is that it's garbage collection that's throwing the connection out. That is, that you're not saving a reference to the connection.

The reason for that thinking is that if he downloads a brand new version of the developer combo and starts a server and two clients from NewGame, they stay connected for a long time.

However, that is a guess, and if's not correct the next steps are:
a) You could do the same test on your machine: Download a new combo pack, and try to run newgame for a few minutes. This will indicate whether it's something in your machine, or in the specific project.
b) You zip up your projects and send it to us, and we'll find the issue. I'll be happy to sign an NDA or similar to ensure you that we won't share your work outside the purpose of finding the error.


Oh Btw, EgoAnt, i checked out the profile on Screenr (screenr.com/user/EgoAnt) and saw that you've made a video tutorial for how to make achievements with GamerSafe.

If you ever wanted to make a tutorial on anything with Player.IO (getting started for instance), we'd be happy to post it on our site somewhere. We've got a tutorials section in the works already... Actually, we'd be very appreciative :D

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Multiple connections from the same IP?

Postby EgoAnt » February 12th, 2010, 3:08 pm

I'd love to do a little getting started video on PlayerIO. I'll do a little research on my end with the connection, it does make sense that it could be Flash garbage collection. I'll also check the server side to make sure it isn't getting dropped there. (I've had a couple run-ins with the Flash garbage collector before, though, so I'll check there first)
User avatar
EgoAnt
 
Posts: 23
Joined: February 2nd, 2010, 5:01 am
Location: Edmonton, AB

Re: Multiple connections from the same IP?

Postby EgoAnt » February 12th, 2010, 9:00 pm

Yes indeed! That was the problem. To get around it I created a Connection var in my base class called activeConnection. The nice thing about this is it also gives me a reference to the connection to send messages back to the server.

Code: Select all
private function handleJoin(connection:Connection):void{
         activeConnection = connection;
}
User avatar
EgoAnt
 
Posts: 23
Joined: February 2nd, 2010, 5:01 am
Location: Edmonton, AB

Re: Multiple connections from the same IP?

Postby Oliver » February 13th, 2010, 2:46 pm

Groovy!

Hoping to see a getting started video (or any other topic) from you soon :-)

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Multiplayer