Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Problem with multisync? logging out my clients

Author
Message
Penfold
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 16th May 2011 01:15
Ive just got back in to programming in the small way and have attempted the collosal rebuild of one of the programs I was working on, I seem to however hit a small snag.

I'm not sure if its multisync my code or another problem causing the client to be disconnected after about 30 seconds can someone check my two code snippets one for the client one for the server to see if there is any *obvious* flaw.

Client:

and server

please note that the files probably wont run even if you have multisync installed unless you change the model filenames.

The best way I've found to test it is to make them into windowed mode and the client into an exe so that multiple copys can be run. then you should see *if its the same as mine* the clients disconnect error and the server lose the names too.

'Ooh 'eck chief'...'crumbs'
Penfold
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 16th May 2011 21:10
Hmm I guess the forums arent as populated as they used to be?

'Ooh 'eck chief'...'crumbs'
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 16th May 2011 21:18
It's been a long time, but I seem to remember if there isn't some kind of communication ongoing between client and server for X milliseconds then the server assumes they have left, and drops them.

So once you are connected, even when you are loading your game assets you still need to send something to the server to let it know you are still there.

When I was using multisync I set up a periodic ping packet. (take the timer value, send it to the server, the server sends it back, compare that to the current timer value for a ping time.) It was kind of a pain to include during asset loading, but it kept the connection alive.

Also make sure you have the latest version. Benjamin might have done something to remove that requirement.

Penfold
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 16th May 2011 21:34 Edited at: 16th May 2011 21:38
Ok I'll try pinging something over every few seconds or something. I'll try from client to server only to reduce bandwidth usage on the server and if that doesnt work both ways.

EDITED/

Oh yeah should have said thanks

Its strange the last version of this I built didnt seem to have a problem with this which is why I'm worried its a code issue.

'Ooh 'eck chief'...'crumbs'
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 16th May 2011 21:57
I ran into that too when I first used this. Turned out that I crossed that threshold where it took more time to load the game assets than the server was willing to wait for me. You might just be loading more assets this time, so it's taking longer than before.

OR

I could be mis-remembering, and it could have been an early version of MikeNet that did that.

Like I said, it's been a while.

Penfold
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 16th May 2011 22:41
seems to have worked *joy*

'Ooh 'eck chief'...'crumbs'

Login to post a reply

Server time is: 2024-05-05 20:14:39
Your offset time is: 2024-05-05 20:14:39