#include "../shared/frdi.h"
Go to the source code of this file.
Compounds | |
struct | frdi__client_app |
struct | frdi__client_user |
struct | frdi__client_server |
struct | frdi__client_game |
Functions | |
frdi_client_app * | frdiClientAppNew (frdi_app *app) |
int | frdiClientAppRun (frdi_client_app *self) |
void | frdiClientAppFree (frdi_client_app *self) |
char * | frdiClientAppDisplay (frdi_client_app *self) |
void | frdiClientPV (frdi_client_app *self, char *str) |
void | frdiClientPVF (frdi_client_app *self, char *format, void *arg) |
frdi_connection * | frdiClientServerConnectionNew (frdi_client_app *self, frdi_application *remote) |
void * | frdiClientServerConnectionRecieve (void *arg) |
void * | frdiClientUserConnectionRecieve (void *arg) |
void | frdiClientConnectionClose (frdi_connection *connection) |
void * | frdiClientUserListenerSpawner (void *arg) |
void | frdiClientUserListenerWaitStop (frdi_client_app *self) |
void | frdiClientUserListenerTellStop (frdi_client_app *self) |
void | frdiClientUserListenerTellStart (frdi_client_app *self) |
frdi_client_user * | frdiClientUserInitialise (frdi_client_app *self, frdi_connection *connection) |
void | frdiClientUserFinalise (frdi_client_app *self, frdi_client_user *user) |
void | frdiClientUserRecieve (frdi_client_app *self, frdi_connection *connection, frdi_message *message) |
void | frdiClientUserMessageSend (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
char * | frdiClientUserDisplay (frdi_client_app *self, frdi_client_user *user) |
frdi_client_server * | frdiClientServerInitialise (frdi_client_app *self, frdi_connection *connection) |
void | frdiClientServerFinalise (frdi_client_app *self, frdi_client_server *server) |
void | frdiClientServerMessageSend (frdi_client_app *self, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerRecieve (frdi_client_app *self, frdi_connection *connection, frdi_message *message) |
char * | frdiClientServerDisplay (frdi_client_app *self, frdi_client_server *server) |
void | frdiClientUserMessageRecieve (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientServerMessageRecieve (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientUserMsU (frdi_client_app *self, frdi_client_user *user, frdi_message *old_message) |
void | frdiClientServerMsU (frdi_client_app *self, frdi_client_server *server, frdi_message *old_message) |
void | frdiClientTellServerStop (frdi_client_app *self, frdi_client_server *server) |
void | frdiClientTellUserStop (frdi_client_app *self, frdi_client_user *user) |
void | frdiClientTellAllStop (frdi_client_app *self) |
void | frdiClientGameSendServer (frdi_client_app *self, frdi_client_game *game, char *str) |
void | frdiClientServerMrD (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrG (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrK (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrL (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrM (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrR (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrU (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrV (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message) |
void | frdiClientServerMrE (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, frdi_message *message, char c) |
void | frdiClientGameSendUser (frdi_client_app *self, frdi_client_game *game, char *str) |
void | frdiClientUserMrD (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrF (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrG (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrK (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrL (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrR (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrU (frdi_client_app *self, frdi_client_user *user, frdi_message *message) |
void | frdiClientUserMrE (frdi_client_app *self, frdi_client_user *user, frdi_message *message, char c) |
void | frdiClientEncryptionMode (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, char *str) |
void | frdiClientAuthenticationMode (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, char *str) |
void | frdiClientAuthenticationTypePass (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, char *str) |
void | frdiClientAuthenticationType (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, char *str) |
void | frdiClientEncodingMode (frdi_client_app *self, frdi_client_user *user, frdi_client_server *server, char *str) |
void | frdiClientGameReceiveServer (frdi_client_app *self, frdi_client_game *game, char *str) |
void | frdiClientGameRevealUsertext (frdi_client_app *self, frdi_client_game *game) |
void | frdiClientGameReceiveUser (frdi_client_app *self, frdi_client_game *game, char *str) |
frdi_client_game * | frdiClientGameNew (frdi_client_app *self, char *game_id) |
void | frdiClientGameLog (frdi_client_app *self, frdi_client_game *game, char *str) |
void | frdiClientGameFinish (frdi_client_app *self, frdi_client_game *game) |
char * | frdiClientGameDescribe (frdi_client_app *self, frdi_client_game *game) |
void | frdiClientGameRegisterDigest (frdi_client_app *self, frdi_client_game *game, char *response) |
void | frdiClientGameVerifyDigest (frdi_client_app *self, frdi_client_game *game, char *response) |
int | frdiClientGameIsAllowed (frdi_client_app *self, frdi_client_game *game, char *prefix) |
int | frdiClientGameCountUsertexts (frdi_client_app *self, frdi_client_game *game) |
int | frdiClientGameCountDigests (frdi_client_app *self, frdi_client_game *game) |
void | frdiClientGameVerifyOutput (frdi_client_app *self, frdi_client_game *game) |
char * | frdiClientGameReport (frdi_client_app *self, frdi_client_game *game) |
frdi_client_server * | frdiClientGetServerForLink (frdi_client_app *self, frdi_client_user *user, char *link_id) |
|
somewhere to put globals |
|
doesn't exist until app ready to close |
|
release the object |
|
return information about this application as a string |
|
print if verbose |
|
print if verbose using format |
|
connect to a named fairdice server app |
|
recieve a message from a client-server connection |
|
recieve a message from a client-user connection |
|
on closing the connection, free the stuff we created |
|
called in its own thread when the User listener receives a connection |
|
wait for the user listener thread to stop |
|
send a message to the user listener thread to stop |
|
launch the thread for the user listener |
|
register a client-user connection |
|
de-register a client-user connection |
|
recieve a message from a client-user connection |
|
send a message along a client-user connection |
|
return a description of this client-user connection |
|
register a client-server connection |
|
de-register a client-server connection |
|
send a message along a client-server connection |
|
recieve a message from a client-server connection |
|
return a description of this client-server connection |
|
recieve a message from a user-client connection D Description F Find G Game K Keepalive L Link R Remote U Unknown |
|
recieve a message from a client-server connection D Description G Game K Keepalive L Link M Mode R Remote U Unknown V Version |
|
send a U type message along a client-user connection |
|
send a U type message along a client-server connection |
|
tell a server connection that they are closing |
|
tell a user connections (and related server connections) that they are closing |
|
tell all connections (server and user) that they are closing |
|
Send str back to the server as a game message |
|
Fairdice Client-Server connection message receive : Description CHALLENGE : D is <description> RESPONSE : none ACTION : set description of server CHALLENGE : D request RESPONSE : D is <description> or RESPONSE : D null ACTION : none |
|
Fairdice Client-Server connection message receive : Game CHALLENGE : G <gamestr> <seperator> <data> RESPONSE : varies ACTION : parse <gamestr> into a frdi_client_game object. pass on to further method |
|
Fairdice Client-Server connection message receive : Keepalive CHALLENGE : K null RESPONSE : none ACTION : none CHALLENGE : K ping request <integer> RESPONSE : K ping response <integer> ACTION : none CHALLENGE : K ping response <integer> RESPONSE : none ACTION : record ping delay CHALLENGE : K time request RESPONSE : K time response <timestamp> ACTION : none CHALLENGE : K time response <timestamp> RESPONSE : none ACTION : synch time |
|
Fairdice Client-Server connection message receive : Link CHALLENGE : L opening RESPONSE : L opened ACTION : none CHALLENGE : L opened RESPONSE : none ACTION : none CHALLENGE : L closing RESPONSE : L closed ACTION : close this end of link CHALLENGE : L closed RESPONSE : none ACTION : close this end of link |
|
Fairdice Client-Server connection message receive : Mode CHALLENGE : M auth <data> RESPONSE : varies ACTION : pass on to authentication negotiation method CHALLENGE : M encrypt <data> RESPONSE : varies ACTION : pass on to encryption negotiation method CHALLENGE : M encode <data> RESPONSE : varies ACTION : pass on to data encoding negotiation method |
|
Fairdice Client-Server connection message receive : Remote CHALLENGE : R <data> RESPONSE : none ACTION : pass on verbatim along the user (keeping the R prefix) |
|
Fairdice Client-Server connection message receive : Unknown CHALLENGE : U null RESPONSE : none ACTION : report the error CHALLENGE : U <verbatim copy of message server got from us> RESPONSE : none ACTION : report the error |
|
Fairdice Client-Server connection message receive : Version CHALLENGE : V request RESPONSE : V offer <number selection> ACTION : none CHALLENGE : V offer <number selection> RESPONSE : V select <number> or RESPONSE : V unsupported ACTION : none CHALLENGE : V select <number> RESPONSE : none or RESPONSE : V unsupported ACTION : none where <number> is a positive integer identifying a specific version of the client-server link protocol. where <number range> is "<number>-<number>" where <number selection> is a comma seperated list of <number> and or <number range> for example 1,3-5,7 |
|
Fairdice Client-Server connection message receive : A Mystery CHALLENGE : <unparsable> RESPONSE : U <unparsable> ACTION : report the error |
|
Send str back to the user as a game message |
|
Fairdice User-Client connection message receive : Description CHALLENGE : D is <description> RESPONSE : none ACTION : set description of user CHALLENGE : D request RESPONSE : D is <description> or RESPONSE : D null ACTION : none |
|
Fairdice User-Client connection message receive : Find CHALLENGE : F set user <userstr> CHALLENGE : F set secret <secret> CHALLENGE : F set server <serverstr> CHALLENGE : F set host <hoststr> RESPONSE : none ACTION : register the string ready for a connection attempt CHALLENGE : F connect RESPONSE : F yes or RESPONSE : F no or RESPONSE : F no <message> ACTION : connect to the server (and host if specified) CHALLENGE : F shutdown RESPONSE : none ACTION : stop the listener, close the application |
|
Fairdice User-Client connection message receive : Game CHALLENGE : G <gamestr> <seperator> <data> RESPONSE : varies ACTION : parse <gamestr> into a frdi_client_game object. pass on to further method |
|
Fairdice User-Client connection message receive : Keepalive CHALLENGE : K null RESPONSE : none ACTION : none CHALLENGE : K ping request <integer> RESPONSE : K ping response <integer> ACTION : none CHALLENGE : K ping response <integer> RESPONSE : none ACTION : record ping delay CHALLENGE : K time request RESPONSE : K time response <timestamp> ACTION : none CHALLENGE : K time response <timestamp> RESPONSE : none ACTION : synch time |
|
Fairdice User-Client connection message receive : Link CHALLENGE : L opening RESPONSE : L opened ACTION : none CHALLENGE : L opened RESPONSE : none ACTION : none CHALLENGE : L closing RESPONSE : L closed ACTION : close this end of link CHALLENGE : L closed RESPONSE : none ACTION : close this end of link |
|
Fairdice User-Client connection message receive : Remote CHALLENGE : R <data> RESPONSE : none ACTION : pass on verbatim along to the client (keeping the R prefix) |
|
Fairdice User-Client connection message receive : Unknown CHALLENGE : U null RESPONSE : none ACTION : report the error CHALLENGE : U <verbatim copy of message server got from us> RESPONSE : none ACTION : report the error |
|
Fairdice User-Client connection message receive : A Mystery CHALLENGE : <unparsable> RESPONSE : U <unparsable> ACTION : report the error |
|
negotiate which encryption mode to use |
|
negotiate which authentication mode to use |
|
messages specific to the authentication mode "pass" |
|
messages specific to a particular authentication mode |
|
negotiate which encoding mode to use |
|
deal with a game str from the server |
|
reveal our input |
|
deal with a game str from the user |
|
create a game object (values get filled in by the create object) |
|
log it |
|
de-register and destroy a game object |
|
describe it |
|
register a digest response is of the form "<integer> <string>" |
|
verify a digest response is of the form "<user_id> <user_text>" |
|
check whether a response is allowed at a particular stage |
|
have we received all the usertexts we requested? (there should be one for every player + 1 for the host - 1 for ourselves |
|
have we received all the digests we requested? (there should be one for every player + 1 for the host - 1 for ourselves |
|
verify the output |
|
report the outcome of a game to the server in complete terms |
|
the correct replacelent for frdiClientGetServerForUser( link_id is of form "foo:123 ^ bar:123" |