Atrinik Client  4.0
Functions | Variables
client.c File Reference
#include <global.h>
#include <resources.h>
#include <toolkit/socket_crypto.h>
#include <toolkit/packet.h>

Go to the source code of this file.


void DoClient (void)
void check_animation_status (int anum)


Client_Player cpl
static socket_command_struct commands [CLIENT_CMD_NROF]

Detailed Description

Client interface main routine.

This file sets up a few global variables, connects to the server, tells it what kind of pictures it wants, adds the client and enters the main event loop (event_loop()) checks the tcp socket for input and then polls for x events. This should be fixed since you can just block on both filedescriptors.

The DoClient function receives a message (an ArgList), unpacks it, and in a slow for loop dispatches the command to the right function through the commands table. ArgLists are essentially like RPC things, only they don't require going through RPCgen, and it's easy to get variable length lists. They are just lists of longs, strings, characters, and byte arrays that can be converted to a machine independent format.

Definition in file client.c.

Function Documentation

void check_animation_status ( int  anum)

Check animation status.

anumAnimation ID.

Definition at line 150 of file client.c.

void DoClient ( void  )

Do client. The main loop for commands. From this, the data and commands from server are received.

Definition at line 89 of file client.c.

Variable Documentation

socket_command_struct commands[CLIENT_CMD_NROF]

Structure of all the socket commands

Definition at line 53 of file client.c.

Client player structure with things like stats, damage, etc

Definition at line 50 of file client.c.