#include <tokencollector.hpp>
Public Member Functions | |
TokenCollector (Handler *h) | |
void | addPendingClient (const std::string &token, Client data) |
Checks if the server expected this client token. | |
void | addPendingConnect (const std::string &token, ServerData data) |
Checks if a client already registered this token. | |
void | deletePendingClient (Client data) |
Removes a pending client. |
The Handler class must provide three member functions:
The delete members will be called whenever the collector considers that a token has become obsolete and it is about to remove it.
Definition at line 90 of file tokencollector.hpp.
void TokenCollector< Handler, Client, ServerData >::addPendingClient | ( | const std::string & | token, | |
Client | data | |||
) | [inline] |
Checks if the server expected this client token.
If so, calls Handler::tokenMatched. Otherwise marks the client as pending.
Definition at line 107 of file tokencollector.hpp.
Referenced by GameHandler::processMessage().
void TokenCollector< Handler, Client, ServerData >::addPendingConnect | ( | const std::string & | token, | |
ServerData | data | |||
) | [inline] |
Checks if a client already registered this token.
If so, calls Handler::tokenMatched. Otherwise marks the data as pending.
Definition at line 114 of file tokencollector.hpp.
Referenced by GameHandler::addPendingCharacter().
void TokenCollector< Handler, Client, ServerData >::deletePendingClient | ( | Client | data | ) | [inline] |
Removes a pending client.
Definition at line 121 of file tokencollector.hpp.
Referenced by GameHandler::computerDisconnected().