Communication Course - Ex4 Description

Last updated: 30/12/04

 

Exercise 4: Implementing an "Echo" server

In this C exercise you will write an ECHO server implementing the ECHO  protocol  following all the steps of the ECHO RFC.


Content:


 

Introduction:

The ECHO service is a standard TCP/IP service: an echo server accepts connection requests from clients on some port. After the connection has been established, the server simply echoes back all the data arriving from the client, until the client disconnects. You will write a ECHO server while following all the steps in the ECHO RFC862 that are relevant for implementing the protocol over TCP. The purpose of the exercise is to learn sockets in C, the select system call and non-blocking I/O.

The program must be written in C.

Synopsis:

Each node is implemented by a process. You should write a program called echoserver .c that implements a node.
The program synopsis (you can assume the input is correct but you should print a usage in case the program is executed with no parameters):

echoserver <port>

Basic requirements of the server design:

Details:

When designing the server, think about the following points:

Testing Your Program:

You will probably need to write a client programs for the ECHO service provided by the server. Use this clients to test your server. Remember: many bugs in a server implementation express themselves only when the server is highly loaded.

Relevant/interesting Man Pages:

Error Handling:

 

General:

 

Policies, Tips and Gradings:

  1. The grading of this exercise will be as follows:

ü      85%: Correctness.

ü      10%: Code structure.

ü      5%: Submission.

 



Start of Page    To the Communication Course Home Page
com1@cs.huji.ac.il