Notification of abnormal exit

Previous topic - Next topic

MrTAToad

It would be nice (if possible), for the host to receive some sort of notification if a client abormally terminates.

trucidare

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

When it terminates, it terminates. You can write a temp file "crashed", and delete it on "normal" app exit.

MrTAToad

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 :)

Moru

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

Hemlos

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.


Bing ChatGpt is pretty smart :O

Moru

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.

Kitty Hello

send the player a message to disconnect, then the player should quit.

Hemlos

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.
Bing ChatGpt is pretty smart :O