Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

State cannot disconnect a network client. #49

Open
JodiTheTigger opened this issue Sep 3, 2013 · 2 comments
Open

State cannot disconnect a network client. #49

JodiTheTigger opened this issue Sep 3, 2013 · 2 comments

Comments

@JodiTheTigger
Copy link
Owner

the interface to disconnect a client is exposed by the NetworkManagerClient.

The Game state itself cannot explicitly disconnect a player (although the state is told when a player disconnects via IStateManager).

It can sorta do it by returning false to IsConnected. But it cannot return a fail reason.

Currently the network depends on IStateManager, but not the other way around (nor do I want that linkage).

Figure out how to solve this, then solve it.

@JodiTheTigger
Copy link
Owner Author

Just return a boost::optional fail message. If it's valid, it's disconnected (and has a fail string) otherwise it's still connected.

@JodiTheTigger
Copy link
Owner Author

Right, State isn't allowed to disconnect the network client. So remove "IsDisconnected" completely.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant