Author Topic: Notification of abnormal exit  (Read 8714 times)

MrTAToad

  • Guest
Notification of abnormal exit
« on: 2008-Oct-26 »
It would be nice (if possible), for the host to receive some sort of notification if a client abormally terminates.

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: Notification of abnormal exit
« Reply #1 on: 2008-Oct-27 »
In the works.
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10682
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Notification of abnormal exit
« Reply #2 on: 2008-Oct-27 »
When it terminates, it terminates. You can write a temp file "crashed", and delete it on "normal" app exit.

MrTAToad

  • Guest
Re: Notification of abnormal exit
« Reply #3 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 :)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1764
    • View Profile
    • Homepage
Re: Notification of abnormal exit
« Reply #4 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

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1618
  • Particle Hawk
    • View Profile
Re: Notification of abnormal exit
« Reply #5 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.


Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1764
    • View Profile
    • Homepage
Re: Notification of abnormal exit
« Reply #6 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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10682
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Notification of abnormal exit
« Reply #7 on: 2008-Oct-28 »
send the player a message to disconnect, then the player should quit.

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1618
  • Particle Hawk
    • View Profile
Re: Notification of abnormal exit
« Reply #8 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.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)