Jump to content
  • 0

When a connection is closed. What function is used?


Zell

Question


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

I have a doubt.

When a user connect to the server with client the function called is "login_mmo_auth", until here ok.

But when a player disconnect from selection char or in server select. Where we know that player disconnects?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

When someone quits the game, the socket closes with EOF. This gets parsed in logclif_parse(login server), chclif_parse(char server), and clif_parse(map server).

In the login server, when it reads EOF it just closes the socket.

In the char server, if a character is already loaded, it might set the character offline, thereby saving the changes.

In the map server, depending on how the client quits, it will either use map_quit, use clif_quitsave which calls map_quit, or nothing (in the case of autotrading).

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

Thank u. I figure out what I wanted cause you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...