0% found this document useful (0 votes)
21 views

CS547/CS490-Network Programming Project Specification/Assignment #1

This document provides specifications for Assignment 1 which involves establishing socket connections between a server and 3 client processes. The server must display a message when a connection request arrives and send the current timestamp to the client. Each client will repeat connecting to the server 5 times, displaying the received timestamp, before terminating. Testing will use 3 PCs, with the server on one and clients on the other two, to ensure no connection requests are dropped.

Uploaded by

aditya aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

CS547/CS490-Network Programming Project Specification/Assignment #1

This document provides specifications for Assignment 1 which involves establishing socket connections between a server and 3 client processes. The server must display a message when a connection request arrives and send the current timestamp to the client. Each client will repeat connecting to the server 5 times, displaying the received timestamp, before terminating. Testing will use 3 PCs, with the server on one and clients on the other two, to ensure no connection requests are dropped.

Uploaded by

aditya aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

CS547/CS490-Network Programming

Project Specification/Assignment #1

Due: September 4th

Assignment 1 - Narrative:

The goal of Phase I is to establish a socket connection between a server and clients. The server
process is supposed to be started at one of the PCs before any client makes a connection request.
Client processes should be started at different PCs. A client process should take one argument as its
client ID when it is started. For example, if your program name of the client process is “client”, then
type “client <client ID>” at the DOS prompt to initiate a client process. The <client ID> should be an
integer ranging 1 through 3 (this means your sever must take 3 client processes and none of the
requests from the three clients should be dropped). After a client process is started, it should prompt a
user to enter the IP address and the port # of the server process. Each time the server receives a
connection request from a client, the server process should display a message, “a connection request
arrived!” on its monitor. After a socket connection is successfully established, the client process
should send its client ID. The server process should receive the message (i.e., the client ID) and
display the following message, “Request from client #.”, where # is the ID of the requesting client.
After the server process displays the client ID, the server returns the current timestamp to the
requesting client. The server process should wait for about one second after it returns the timestamp
to the client. The client should receive the timestamp and display it on its local monitor. After the
client received the timestamp, the client should disconnect the socket connection and repeat the whole
process from the beginning. Each client should be designed to repeat this procedure 5 times and after
5 repeats, it should terminate itself. For each repeat, the client process should wait for one second. In
the server side, execution should go back to “accept” function call. During the process, no connection
requests from clients should be dropped (i.e., waiting clients should be served in the arriving order
(First-Come-First-Serve order).

Technical Issues:
For socket connection to be established, the following specifications should be satisfied:
(1) Network protocol: Internet Protocol (IP)
(2) Connection type: connection-oriented socket (stream socket = TCP)
(3) The format of the timestamp is HH:MM:SS (H: Hour, M: Minute and S: Second).

Flow Chart:

CLIENT 3 clients
SERVER

Socket
Socket
Bind

Listen

Display: “a request arrived” Accept


Connect
Repeat 5 times
Display: “From client X” Read
Write

Write Read Display: “Time: XX:XX”

Wait 1 sec.
Close

Wait 1 sec.

End

Testing:

Testing will be performed using three PCs. The server process is going to run at a PC, two clients will
be run at another PC and the third PC will be used for the third client process. All the outputs should
be as expected and no connection request should be dropped until the end of the test.

You might also like