client.h File Reference

This is an header file for "client.c" which includes all the header files and global variables used. More...

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <time.h>
#include <signal.h>
#include <sys/select.h>
#include <fcntl.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <gtk/gtk.h>

Go to the source code of this file.

Classes

struct  client_data
 Used for storing client information like file descriptor through which client is connected, nick name of the connected client, ip address of client machine. More...
struct  transmit_unit
 Used as the the basic unit of communication between client and server. More...

Defines

#define BUFFER   4096
 defines maximum data transfer
#define DATASIZE   100
 defines data size for ip, nick

Variables

GtkWidget * entry
 GTK entry for typing messages.
GtkWidget * entry_ipaddress
 GTK entry for entering IP address of server.
GtkWidget * entry_nick
 GTK entry for entering nick name.
GtkWidget * entry_port
 GTK entry for entering the port number.
GtkTextBuffer * buffer
 for Chat Window.
GtkTextIter iter
 iterator for Text Buffer used in chat window
GtkListStore * list_store
 List for showing all connected clients.
GtkTreeIter t_iter
 iterator for list used in List
int socket_file_descriptor
 used to store file descriptor of socket when opened.
char msg [BUFFER]
 used for storing message
char nick [BUFFER]
 used for storing nick name
char ip [BUFFER]
 used for storing ip address


Detailed Description

This is an header file for "client.c" which includes all the header files and global variables used.

Author:
Ratna Kumar K.V.R

Definition in file client.h.


Define Documentation

#define BUFFER   4096

defines maximum data transfer

Definition at line 22 of file client.h.

Referenced by connect_server(), and start_client().

#define DATASIZE   100

defines data size for ip, nick

Definition at line 23 of file client.h.


Variable Documentation

GtkTextBuffer* buffer

for Chat Window.

Definition at line 52 of file client.h.

Referenced by main(), and start_client().

GtkWidget* entry

GTK entry for typing messages.

Definition at line 48 of file client.h.

Referenced by main(), and msg_func().

GtkWidget* entry_ipaddress

GTK entry for entering IP address of server.

Definition at line 49 of file client.h.

Referenced by connect_server(), and main().

GtkWidget* entry_nick

GTK entry for entering nick name.

Definition at line 50 of file client.h.

Referenced by connect_server(), and main().

GtkWidget* entry_port

GTK entry for entering the port number.

Definition at line 51 of file client.h.

Referenced by connect_server(), and main().

char ip[BUFFER]

used for storing ip address

Definition at line 60 of file client.h.

Referenced by connect_server(), and start_client().

GtkTextIter iter

iterator for Text Buffer used in chat window

Definition at line 53 of file client.h.

Referenced by main(), and start_client().

GtkListStore* list_store

List for showing all connected clients.

Definition at line 54 of file client.h.

Referenced by connect_server(), main(), and start_client().

char msg[BUFFER]

used for storing message

Definition at line 58 of file client.h.

Referenced by msg_func().

char nick[BUFFER]

used for storing nick name

Definition at line 59 of file client.h.

Referenced by connect_server().

used to store file descriptor of socket when opened.

Definition at line 57 of file client.h.

Referenced by close_properly(), connect_server(), end_program(), msg_func(), and start_client().

GtkTreeIter t_iter

iterator for list used in List

Definition at line 55 of file client.h.

Referenced by connect_server(), and start_client().


Generated on Wed Apr 7 17:03:11 2010 for LAN-Messenger(Client) by  doxygen 1.5.8