Detecting when a client has crashed
by Gordon Marsh · in General Discussion · 09/21/2006 (4:30 pm) · 7 replies
All,
In testing a Torque game, it is feasible for one or more of the clients to disconnect through a problem such as a crash, network connection going down etc etc.
Eventually the server realises that a client has disappeared and removes them.
In this eventuality I'd like to call a function to do some cleaning up - anyone know where I could call this from?
Thanks, Gords
In testing a Torque game, it is feasible for one or more of the clients to disconnect through a problem such as a crash, network connection going down etc etc.
Eventually the server realises that a client has disappeared and removes them.
In this eventuality I'd like to call a function to do some cleaning up - anyone know where I could call this from?
Thanks, Gords
#2
09/22/2006 (3:44 am)
Thanks for the hint Orion, I'll post back here when I find out exactly where this is...
#3
function GameConnection::onDrop(%client, %reason)
located in clientConnection.cs.
Thanks, Gords
09/22/2006 (4:42 am)
Cheers Orion, for anyone interested, I think the function needed is:function GameConnection::onDrop(%client, %reason)
located in clientConnection.cs.
Thanks, Gords
#4
(actually, i'm on the road more or less evangelizing for torque, funnily enough)
09/22/2006 (1:02 pm)
Glad you found it Gordon! sorry i wasn't more specific, i'm on the road w/o my dev. env!(actually, i'm on the road more or less evangelizing for torque, funnily enough)
#5
09/22/2006 (1:05 pm)
@Orion: awaiting email! (hehe, no, you don't owe me an email, but you just intrigued me...)
#6
09/22/2006 (1:31 pm)
@stephen - ;) just sent you one from a gmail address.
#7
09/23/2006 (6:46 am)
Is this Torque roadshow coming to the UK any time soon? :)
Associate Orion Elenzil
Real Life Plus
- grep the codebase for "CDROP" in an echo() or con::printf. i think that's a good place to hook into that.