Jump to content
  • Advertisement
Sign in to follow this  

Raknet problem, when client app crash

This topic is 4816 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have a problem when my client application crash. I'm using Raknet for the network. when the client application crash, the client doesn't send disconnection notification to the server. when the client try to reconnect using the same port, the server doesn't even receive a static data. i'm guessing, that this is because the client never call the disconnect method because it crash/end process from task manager, so the server never disconnect the client, and when a client with same port try to reconnect, the server ignore the connection request. my question is: 1. is raknet do auto ping, if the client doesn't reply, than the server disconnect automatic??? because i wait for the server declare that the client time out, so it will disconnect, but it never happen. 2. if the raknet doesn't do autoping, how should i know that the client no longer connected to the server?? thx

Share this post


Link to post
Share on other sites
Advertisement
how long are you waiting before trying to connect again? it might take up to a few minutes to get the disconnect notification.

also, im not sure why you cant connect and receive static data though. i cant remember if that happends for me too or not, since my game wont allow you to log back in untill you time out.

Share this post


Link to post
Share on other sites
@graveyard filla
i've wait long enough.
i mean almost forever. *lol*.
from your answer, you suggest that raknet do autoping?
but why the client never time out??? T_T
if the client really do time out, where i receive this notification?? is it on ReceiveDisconnectionNotification method??


thx for your answer

Share this post


Link to post
Share on other sites
And also, you don't have to set a static port for the client to use, just use port 0 and it will choose a free one, and reconnect fine. The only port that matters is the server port.

Share this post


Link to post
Share on other sites
i've tried to send a reliable packet to the crashed client.
and after few second it receive connection lost, but i have to send two reliable packet. if i send only once it never receive connection lost.
and it seems raknet doesn't do autoping, because i have to send reliable packet my self. or ping considered as non reliable packet??
so what do you think i should do??
should i send a packet every few second to check if the client is disconnected?
or is there another way??

thx

Share this post


Link to post
Share on other sites
Use it as intended. Raknet is very well tested and works. You are probebly doin't something wierd. Raknet will detected that the connection is dead when a reliable send fails after a timeout. Is the server trying to send anything to the dissconnected client?

Share this post


Link to post
Share on other sites
i have send packet to the disconnected client from the server, but i have to send the packet twice to get connection lost notification. fyi, i send the same packet.
i'm don't know if i doing something weird.*sigh*.
do you ever tried to send packet to disconnected client?? do you have to send it twice to get connection lost notification??
but if you never had a problem like me, it means that it is my bad.
alright then, i guess i better recheck my code.

thx peter_b

Share this post


Link to post
Share on other sites
Check the examples that come with RakNet (if any). You shouldn't need to send anything - the server should eventually determine that the conneciton was lost (I think!). Post your question on the RakNet forums instead of here.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!