CSC645/745 Computer Networks: Simple Client and Server Programs

Programming

CSC645/745 COMPUTER NETWORKS

Project 1

1. Goal

The goal of this project is to write simple client and server programs for text

messaging and Internet chatting. The programming language is C and the

operating system is Linux.

2. Instruction

Write a server program and a client program. The server manages a number of

client accounts, each having a username and a password.

Start the server first. When a client process is started, it has a menu for six

functions:

0. Connect to the server

1. Get the user list

2. Send a message

3. Get my messages

4. Initiate a chat with my friend

5. Chat with my friend

These functions allow the client to log onto the server through a TCP connection

using his/her username and password, get the list of other users on the server,

send a text message to another user, check his/her own text messages that were

left by other users, and perform chat with another user.

3. Sample Code

We provide sample code consisting of an “echo” server program and a client

program. The client establishes a TCP connection with the server, and sends a

message to the server, which will echo the message back to the client for display.

Essentially, it gives you a programming template that you can follow to write

your own networking program.

4. Demo

Use the following scenario for demo. The server maintains two client accounts.

One is for Alice, and the other is for Bob. Alice logs onto the server first. She gets

the user list and sees Bob. She sends a text message to Bob. The message carries

Alice’s IP address x and a port number y. After that, Alice selects “4. Initiate a

chat with my friend”, which terminates the TCP connection to the server, and

waits on port y for chatting with Bob. Next, Bob logs onto the server. He logs on

and retrieves his text messages. After seeing Alice’s message, Bob selects “5. Chat

with my friend”, which terminates the TCP connection to the server, and starts a

new TCP connection to Alice on port y. Then, Alice and Bob type in turn, and the

text typed by one will be sent to the other for display.

More details can be found from the demo video posted on iLearn.

5. Submission

Submit one ZIP file consisting of all source files and executables to the regular

submission link on iLearn.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational