#include "frdi_server.h"
Functions | |
void | frdiServerGameCheckReadyForOutcome (frdi_server_app *self, frdi_server_game *game) |
void | frdiGameAnnounceOutcomeToHost (frdi_server_app *self, frdi_server_game *game) |
void | frdiGameAnnounceOutcomeToPlayers (frdi_server_app *self, frdi_server_game *game) |
char * | frdiServerGameUseridFromClient (frdi_server_app *self, frdi_server_game *game, frdi_server_client *client) |
frdi_server_client * | frdiServerGameClientFromName (frdi_server_app *self, frdi_server_game *game, char *name) |
void | frdiServerGameInitialiseSeed (frdi_server_app *self, frdi_server_game *game) |
void | frdiServerGameInitialiseInput (frdi_server_app *self, frdi_server_game *game) |
void | frdiServerGameSetGameStage (frdi_server_app *self, frdi_server_game *game, int stage) |
void | frdiServerGameSetUserStatus (frdi_server_app *self, frdi_server_game *game, frdi_server_client *client, int status) |
int | frdiServerGameIsAllowed (frdi_server_app *self, frdi_server_game *game, char *prefix) |
void | frdiServerGameRegisterDigest (frdi_server_app *self, frdi_server_game *game, char *user_id, char *digest) |
void | frdiServerGameReceiveClient (frdi_server_app *self, frdi_server_game *game, frdi_server_client *client, char *str) |
void | frdiServerGameReceiveHost (frdi_server_app *self, frdi_server_game *game, char *str) |
frdi_server_game * | frdiServerGameNew (frdi_server_app *self, char *game_id) |
void | frdiServerGameLog (frdi_server_app *self, frdi_server_game *game, char *str) |
void | frdiServerGameFinish (frdi_server_app *self, frdi_server_game *game) |
char * | frdiServerGameReport (frdi_server_app *self, frdi_server_game *game) |
char * | frdiServerGameDescribe (frdi_server_app *self, frdi_server_game *game) |
frdi_server_user * | frdiServerUserNew (frdi_server_app *self) |
frdi_server_user * | frdiServerUserGetFromId (frdi_server_game *game, char *user_id) |
frdi_server_user * | frdiServerUserGetFromClient (frdi_server_game *game, frdi_server_client *client) |
frdi_list * | frdiServerUserListMatchStatus (frdi_server_game *game, int status) |
char * | frdiServerUserDescribe (frdi_server_app *self, frdi_server_user *user) |
|
if all the plaintexts are in, calculate the outcome and tell the host |
|
let the host know what the result is |
|
let the players know what the result was (starts the verification phase) |
|
find the char* user_id from the frdi_server_client *client |
|
return a client object, given the name passed to the host |
|
sets up properties |
|
sets up the host's input |
|
set the games's stage to one of: define FRDI_SERVER_GAME_STAGE_UNSET -1 define FRDI_SERVER_GAME_STAGE_OPENING 1 define FRDI_SERVER_GAME_STAGE_INIT 2 define FRDI_SERVER_GAME_STAGE_RAND 3 define FRDI_SERVER_GAME_STAGE_GENR 4 define FRDI_SERVER_GAME_STAGE_VERI 5 define FRDI_SERVER_GAME_STAGE_CLOSING 6 |
|
set the user's status to one of: not connected define FRDI_SERVER_GAME_USER_UNSET -1 connected but not yet accepted by the host define FRDI_SERVER_GAME_USER_CLIENT 1 accepted by the host, but no user_num yet define FRDI_SERVER_GAME_USER_HOST 2 has a user_num allocated by the server define FRDI_SERVER_GAME_USER_SERVER 3 has revealed their usertext define FRDI_SERVER_GAME_USER_USER 4 has finished their verification define FRDI_SERVER_GAME_USER_CONTENT 5 |
|
check whether a response is allowed at a particular stage |
|
register a digest |
|
deal with a game str from the client (Note: of all the GameReceive method, this has an extra argument, because of the two directions on each of the three links, this is the only many:one link
|
|
deal with a game str from the host |
|
create a game object (values get filled in by the create object) |
|
log it |
|
de-register and destroy a game object |
|
report the outcome of a game to the server in complete terms |
|
describe it |
|
create fake user object |
|
return a user obj |
|
return a user obj |
|
return a list of all user_objs that have status X |
|
return a string describing an frdi_server_user object |