server.c File Reference

This program is created for implementing the Exam Evaluator project server. More...

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

Go to the source code of this file.

Defines

#define BUFFER   4096

Functions

void close_properly (int signal)
 This function is called when user types ctrl+c which will shut down the client completely.
int main (int argc, char *argv[])
 Used to connect to tcp server and print the results on the window.

Variables

sqlite3 * database1
sqlite3 * database2
int sfd1

Detailed Description

This program is created for implementing the Exam Evaluator project server.

This evaluates the student answers and gives the result.

Author:
Khaja Peer Syed

Definition in file server.c.


Define Documentation

#define BUFFER   4096

Definition at line 21 of file server.c.


Function Documentation

void close_properly ( int  signal  ) 

This function is called when user types ctrl+c which will shut down the client completely.

Parameters:
signal is the file descriptor which needs to be closed.

Definition at line 33 of file server.c.

References sfd1.

int main ( int  argc,
char *  argv[] 
)

Used to connect to tcp server and print the results on the window.

The use must provide the i.p. address of tcp day tine server through command line argument and then time is printed in human readable format. Note that it will work only for ipv4 servers.

Returns:
zero to calling program on success, else 1.
Parameters:
argc number of command line arguments passed to the program including program name itself.
argv array of command line arguments.

Definition at line 65 of file server.c.

References BUFFER, database1, database2, rc, sfd1, and temp.


Variable Documentation

sqlite3* database1

Definition at line 24 of file server.c.

sqlite3 * database2

Definition at line 24 of file server.c.

Referenced by main().

int sfd1

Definition at line 27 of file server.c.

Referenced by close_properly(), and main().

Generated on Wed Apr 7 23:41:26 2010 for Course_Project by  doxygen 1.6.3