GLBasic forum

Feature request => Network => Topic started by: MrTAToad on 2008-Oct-26

Title: Notification of abnormal exit
Post by: MrTAToad on 2008-Oct-26
It would be nice (if possible), for the host to receive some sort of notification if a client abormally terminates.
Title: Re: Notification of abnormal exit
Post by: trucidare on 2008-Oct-27
In the works.
Title: Re: Notification of abnormal exit
Post by: Kitty Hello on 2008-Oct-27
When it terminates, it terminates. You can write a temp file "crashed", and delete it on "normal" app exit.
Title: Re: Notification of abnormal exit
Post by: MrTAToad on 2008-Oct-27
Indeed.

The only way I can think of would be to send regular messages to all players and wait for a return message.  If none arrives after a certain time, you have a problem :)
Title: Re: Notification of abnormal exit
Post by: Moru on 2008-Oct-27
But how do you stop sending to a client that has a problem? The only option you have is to send to all clients, even those that are having 1500 ms ping
Title: Re: Notification of abnormal exit
Post by: Hemlos on 2008-Oct-28
Build a ping function....

PING(playerid), wait wait wait, if wait>2 seconds, KILLPLAYER()

Ping is just an instance of a small message being sent, at a specifed time.
Then it counts the time elapsed for the return reciept.

The net() functions are capable of this. Networking is quite sophisticated, and much time is needed to setup a network that functions smoothly. You will find issues, and you have the power with GLBasic to alter the functions/routines to fit the circumnstances.


Title: Re: Notification of abnormal exit
Post by: Moru on 2008-Oct-28
That's what I'm asking about, how do I KILL a player? I know how to set up some sort of ping as you can see in my post. But how do I get rid of the player? When I just kill the connection the player still shows up as connected until I shut down the server.
Title: Re: Notification of abnormal exit
Post by: Kitty Hello on 2008-Oct-28
send the player a message to disconnect, then the player should quit.
Title: Re: Notification of abnormal exit
Post by: Hemlos on 2008-Oct-28
And after what gernot said, if that doesnt work..because thier ping is so bad they dont recieve the disco message..

Force the server to remember who it killed, and update all the clients.

When the player comes back, he will have another new id.