HY335a-Project
A_multithread_chat_Server_and_chat_client
|
#include <chatserver.h>
Public Attributes | |
int | socket_discriptor |
char * | username |
char * | ip |
bool | is_logged_in |
struct connection * | previous |
struct connection * | next |
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
char* connection::ip |
The IP address in dot notation of the client
bool 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