Server Detecting Client Disconnect

1,163 views
Skip to first unread message

That Guy

unread,
Feb 20, 2013, 7:02:42 AM2/20/13
to lidgren-ne...@googlegroups.com
Um, how does the server detect if a client has disconnected?
The client could send a message when it chooses to disconnect or shutdown but, what if the internet just crashes?
The Server must find out eventually if a client is no longer online, but how do I access that info?

lidgren

unread,
Feb 20, 2013, 7:13:59 AM2/20/13
to lidgren-ne...@googlegroups.com
You will get a StatusChanged message when a remote peer disconnected (due to timeout for example)

--michael

That Guy

unread,
Feb 20, 2013, 7:31:26 AM2/20/13
to lidgren-ne...@googlegroups.com
Ah, ok, and I find out which connection it was that disconnected using inMsg.SenderConnection.
Thanks.

Charles Perniciaro

unread,
Feb 21, 2013, 11:06:54 AM2/21/13
to lidgren-ne...@googlegroups.com
Where does the message come from?  If the client is drops, he can't send it, right?  I am about to attempt to solve this problem as well, because I don't want my master server to try and match disconnected people from the matchmaking queue.

lidgren

unread,
Feb 21, 2013, 11:35:36 AM2/21/13
to lidgren-ne...@googlegroups.com
The library generates this message itself when it detects that a remote peer has timed out. You can control this time in NetPeerConfiguration.ConnectionTimeout

--michael

Charles Perniciaro

unread,
Feb 21, 2013, 1:19:22 PM2/21/13
to lidgren-ne...@googlegroups.com
Cool.  This library is awesome.

John Chalmers

unread,
Aug 29, 2019, 2:54:15 AM8/29/19
to lidgren-network-gen3
This library is awesome!
Reply all
Reply to author
Forward
0 new messages