zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
chatd.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "SDL.h"
#include "SDL_net.h"
#include "chat.h"

Go to the source code of this file.

Functions

static void cleanup (int exitcode)
 
void HandleClient (int which)
 
void HandleServer (void)
 
 main (int argc, char *argv[])
 
void SendNew (int about, int to)
 

Variables

struct {
   int   active
 
   Uint8   name [256+1]
 
   IPaddress   peer
 
   TCPsocket   sock
 
people [CHAT_MAXPEOPLE]
 
static TCPsocket servsock = NULL
 
static SDLNet_SocketSet socketset = NULL
 

Function Documentation

static void cleanup ( int  exitcode)
static
void SendNew ( int  about,
int  to 
)

Variable Documentation

int active

Definition at line 40 of file chatd.c.

Uint8 name[256+1]

Definition at line 43 of file chatd.c.

IPaddress peer

Definition at line 42 of file chatd.c.

Referenced by HandleClient(), and SendNew().

struct { ... } people[CHAT_MAXPEOPLE]
TCPsocket servsock = NULL
static

Definition at line 37 of file chatd.c.

Referenced by cleanup(), HandleServer(), and main().

SDLNet_SocketSet socketset = NULL
static

Definition at line 38 of file chatd.c.

Referenced by cleanup(), HandleClient(), HandleServer(), and main().