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.

AppGameKit Studio Chat / getsocketlistenerconnection question

Author
Message
smerf
14
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 11th Jun 2019 20:02
getsocketlistenerconnection() this returns "100001" when a client connects. if a new client connects its increments to "100002". if my assumption is correct this is a socket handeler and it simply assighns a client that connects to the next available socket. However if i delete socket 1 and 2 and my client is on socket 3 the next clients is assighned to socket 4. It continually increments reguardless of the lower sockets being available. So my question is what happens when the socket reaches 999999? does it roll over and start assighning from the bottom again or will my server crash or be permanently full?
A child's dream never dies.





smerf
14
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 12th Jun 2019 20:52
doesnt matter i suppose id have to have 10,000 players that each connected 90 times a week and id only have to have a minute of down time to restart the listener once a week. question does still stand though.
A child's dream never dies.





SFSW
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 12th Jun 2019 23:10
I think that behavior is true of AGK's return indexes in general, but I'm not sure what will happen on the multiplayer side of things once a limit is reached. Hopefully it would loop or something. You could probably set up a test project to just cycle through big chunks of connect/disconnect events to gauge how high the limit is and what happens. If there is a potential problem, you could set up some kind of server-side restart/relaunch (automatic or manual) to refresh them and start over at a desired interval.

This forced balloon structure can be a bit challenging for designing a multiplayer system around in general, especially considering how some things are 'freed' upon release while others aren't. Plus, listing can be mismatched also. For example, you can access a player list in AppGameKit via the 'GetNetworkFirstClient' and 'GetNetworkNextClient' commands. However, the list of players will not be consistent between host and clients. Nor will the list be consistent with the sequence of client indexes/joining order. In fact, if you poll the player names with 'GetNetworkClientName', you'll find that your name will generally be in the first client slot returned from the list, regardless of the index it may have been assigned and regardless of whether you were the host or a client. So not only are indexes not persistent or consistent, the returned player list isn't either. And the player list itself won't match the index order or join order either.

So hopefully, you've also accounted for the potential mismatches and differences between the various client values so each can handle their own listing structure independently yet still remain linked for required dependencies. It's all quite a departure from how multiplayer frameworks typically handle things.
smerf
14
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 14th Jun 2019 19:36
well im not to worried about the tgc commands for networking atm. im building my own function library that i will release to the community in a couple weeks. should take all of the headache and problems out server/ client communications fir the community. and one command set will work on html5 wan or lan cause im building it with sockets. that is my hope at least.
A child's dream never dies.





SFSW
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 14th Jun 2019 23:17
That will likely help a lot of developers, especially if it's a collection of functions within AppGameKit code. But if it's a DLL/SO/etc plugin library, it'll be important to make sure it works on the same platforms AppGameKit does (ie Windows x86, x64, Linux, Android, MacOS, etc, etc), otherwise it will be significantly limited in its applications compared to the development language it is intended for.

Login to post a reply

Server time is: 2019-11-14 18:56:57
Your offset time is: 2019-11-14 18:56:57