Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 3 16:19:08 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 m93NJ7WV014049 for ; Fri, 3 Oct 2008 16:19:07 -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 m93NOG6X000453 for ; Fri, 3 Oct 2008 16:24:16 -0700 Message-Id: <200810032324.m93NOG6X000453@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Sockets Date: Fri, 03 Oct 2008 16:24:16 -0700 From: Bill Cheng Someone wrote: > The FAQs say: > *"You can assume that the nodes are not malicious. So, when you read a > message, you should read the common header first, and all in one shot. Then > you parse the common header and figure out what Data Length is. Then you can > decide how you want to read the data." > > *Does this mean we can use something like sprintf for sending the data ? Why would you say that? > Also, is it mandatory to send it as a string, or can we still use the method > used in warmup#1 ? This is a *networking* project! Please get the *networking* part right! Please see the Message Format section of the final project spec. Your messages must conform to the spec! For example, in the common header, bytes 1 through 20 is the UOID. I don't think you can use sprintf() to get it done right. -- Bill Cheng // bill.cheng@usc.edu