Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 2 19:48:55 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m832mtnV027552 for ; Tue, 2 Sep 2008 19:48:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m832kZwZ001340 for ; Tue, 2 Sep 2008 19:46:35 -0700 Message-Id: <200809030246.m832kZwZ001340@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs-551 warmup-1 Date: Tue, 02 Sep 2008 19:46:35 -0700 From: Bill Cheng Someone wrote: > Ii is mentioned in the specs that 'If -m is specified, upon receiving a > message from a client, the server should print information about the request > message to stdout.' but it doesn't say what is to be done if -m is not > given. > So if nothing is to be printed out when -m is not given, it means that > everything is taking place between the server and client as usual but there > is nothing printed out on stdout by client and server,right ? For each type of command, you need to print out the result of the command. For example, for the adr command, you need to print "ADDR = ...". If -m is specified, in addition to the result of the command, you need to print out information about the message header. > Also if -d is used at the server, can we just simply use sleep() or any > busy-waiting technique for 'delay' secs to keep the server idle(after > receiving msg from client)? You should *never* do busy-wait for this class! Never! You can call sleep() or select() or anything else that would yield the CPU for a specified interval. -- Bill Cheng // bill.cheng@usc.edu