NetworkDesign: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann |
imported>Hendrik Brummermann |
||
| Line 53: | Line 53: | ||
[[Image:messages-logout.png|thumb|The client sends a logout request and the server accepts or denies it.]] |
[[Image:messages-logout.png|thumb|The client sends a logout request and the server accepts or denies it.]] |
||
If the player is in some kind of combat it is often desirable to prevent him from saving his live by logging out. Therefore the client sends a logout request to the server and the game server can decide whether to accept or reject it. Of course the user can close the client window or force a disconnect of his Internet connection. But in these cases he will simple stay in a game unattended until the timeout anyway. |
|||
The clients indicates that it wants to finish the session by sending a [http://stendhal.game-host.org/hudson/job/marauroa_HEAD/javadoc/marauroa/common/net/message/MessageC2SLogout.html C2SLogout]. |
|||
The server can reply with a [http://stendhal.game-host.org/hudson/job/marauroa_HEAD/javadoc/marauroa/common/net/message/MessageS2CLogoutNACK.html S2CLogoutNACK] to reject the logout request. Or it confirms the request with a [http://stendhal.game-host.org/hudson/job/marauroa_HEAD/javadoc/marauroa/common/net/message/MessageS2CLogoutACK.html S2CLogoutACK]. In this case the client state is changed to logged out. |
|||
{{br}} |
{{br}} |
||