HY335a-Project
A_multithread_chat_Server_and_chat_client
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
Data Fields
connection Struct Reference

#include <chatserver.h>

Data Fields

int socket_discriptor
char * username
char * ip
boolean is_logged_in
struct connectionprevious
struct connectionnext

Detailed Description

In this struct we keep information for every active connection.

The server keeps a list with all the connections. If a new client connects the server adds a node to the list. Until the client performs a loggin, is_logged_in remains FALSE, and username is NULL.

NOTE: Fill free to add your own fields


Field Documentation

char* connection::ip

The IP address in dot notation of the client

boolean connection::is_logged_in

TRUE if it is logged in. FALSE otherwise

int connection::socket_discriptor

The socket discriptor of the connection with the client

char* connection::username

The username of the client or NULL if it is not logged in


The documentation for this struct was generated from the following file: