1 / 8

PA1 discussion

PA1 discussion. Junxian (Jim) Huang hjx@eecs.umich.edu EECS 489 W11 http://www.eecs.umich.edu/courses/eecs489/w11/. PA1: Socket Programming. Due 1/23/2011 11:59PM EST Late policy will apply Submission / afs/umich.edu/class/eecs489/w10/SUBMIT/< uniqname >/hw1 Your task Server Client

Download Presentation

PA1 discussion

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PA1 discussion Junxian (Jim) Huang hjx@eecs.umich.edu EECS 489 W11 http://www.eecs.umich.edu/courses/eecs489/w11/

  2. PA1: Socket Programming • Due 1/23/2011 11:59PM EST • Late policy will apply • Submission /afs/umich.edu/class/eecs489/w10/SUBMIT/<uniqname>/hw1 • Your task • Server • Client • Testing & debug • Questions? • Discussion in the forum (preferred) • Send me email or come to office hours

  3. You are provided with .. • Makefile • make clean / make all / make tar • server.c • Skeleton for server • client.c • Skeleton for client • header.h • README • Data • Test input data

  4. Sockets API • Applications need Application Programming Interface (API) to use the network • API: set of function types, data structures and constants • Allows programmer to learn once, write anywhere • Greatly simplifies job of application programmer application API transport network data-link physical

  5. server.c • Input • ./server hostname port • Should not quit after 1 request • Runs forever unless killed by Ctrl+C • Should queue multiple connections (>= 5) • Prints out anything sent from client to standard output

  6. client.c • Input • ./client port • After running, anything in the standard input is accepted include <ENTER> • When to quit? • When EOF or 2X<ENTER> is detected • Both of these termination conditions will be checked • Using pipe to direct a file content as input • ./client port < data

  7. How to test & debug? • make (DEMO) • tcpdump (DEMO) • gdb (OPT DEMO)

More Related