VIEWS: 10 PAGES: 2 POSTED ON: 11/28/2009
Assignment : Network programming with C in UNIX environment Description of given code : attached file “Given Code.zip” C-Codes for UNIX: client_TCP.c dst server_it.c seller_TCP.c server_distri.c client_distri.c DST_sock.o DST_sock.c To use in Assignment A client program A shell script to compile a client or server program An iterative server program Seller program Multicast server program multicast receiver program An object file with essential socket facilities Module file with essential socket facilities Introduction The purpose of this assignment is to give students an opportunity to gain some experience at designing and implementing an application of TCP and UDP transport protocols with the C language in a UNIX (LINUX) environment. The application is an auction software package with both uni-casting and multicasting. The package is composed of a server program (server_auction.c) and a client program (client_auction.c). It can be assumed that the size of any message exchanged between the server and client programs is less than 200 characters. To start an auction session, a seller uses a client program to send to the server an initial auction message in the form: DST&Seller&Product details&Init bid&Closing time &$& Upon receiving the message, the server closes the connection, checks the validity of the message, and if OK, multicasts the message. The server then waits for bid offers. Upon receiving a multicast message, a client will analyse and display the message in the format (for example): Seller: Product details: Current bid: Closing time: Kim Sonny, Laptop $20.00 5:00 pm 27 OCT 08 (or Winner) Any buyer can use a client to send to the auction server a bid message in the following format: DST&Buyer & Product details & bid offer &$& Upon receiving the message, the server closes the TCP connection and checks the validity of the bid, then if OK, multicasts a message in the following format: DST&Seller&Product details&Current bid&Closing time &$& At the closing time of an auction session, the server multicasts the final auction result in the format: DST&Seller & Product details & Final bid &Winner&$& If the auction session fails, in the final auction message, the winner is the seller. Part 1 (60% + 20% for demonstration) In this part, it is assumed that at any time, there is only one auction session. 1. Server program (30%+10%): Implement the server_auction program. Test the auction server with the VB client_TCP program and the client_distri program used in the DST lab. Report the correctness of the server operation with test evidences. 2. Client program (30%+10%): Implement the client_auction program. Test the whole auction package. Report the correctness of the package operation with test evidences. Part 2 (15% + 5% for demonstration) Modify the auction package so that at some instant there may have more than one auction sessions. Documentation and Submission Each group must have only ONE submission, which is composed of two parts: a hard-copy of word document and a plain (not zipped) soft-copy of the word document. 1. The hard-copy document must be on A4 papers. Assignment documentation on A4 papers including detail state diagrams (or transition tables), flow charts (NS charts), and the source codes of the whole package. Students must give reasons to support their choices (e.g., iterative or concurrent server) in the designs. Document must also include screen dumps with explanation showing that the programs work correctly. On the first page of the assignment document, students MUST give the parts achieved. If the achieved parts are not clearly reported on the front page, tutors may assume that the student attempts only Part 1 2. The soft-copy of the word document must be sent by email to the tutor with the sender’s address being a legal UC mail address of one member of the group. Students must keep a record of their email submission in the email sent items folder or using the email “cc” mechanism.
Pages to are hidden for
"Assignment Network programming with C in UNIX environment"Please download to view full document