[cs631apue] hw4 questions.

Jan Schaumann jschauma at stevens.edu
Mon Nov 14 10:45:44 EST 2011


afonsec1 <afonsec1 at stevens.edu> wrote:
>
> Can we have/allow a port number zero giving by the user?

It'd probably be good to restrict this.  Zero is, technically, a valid
port, but its seen various uses over time / different OS.

> When writing for the first time into the log file,  should truncate or  
> append for each session?

If the manual page does not specify this, then this is up to you.

Think about what would be desirable from the user's point of view.  What
would make sense from the principle of least surprise?

> If we are in debug mode but log file is giving, should we ignore the log 
> file name? or throw an error?

This is up to you - again, think about what makes the most sense.

> For printing usage (-h),  should always send to stdout or stderr?

Note that it may be reasonable to have it go either way, depending on
the reason you're printing the usage:

If the user explicitly asks for the usage by passing '-h', then stdout
would make sense.  If the user provides illegal options, then stderr
would make sense.

See what other standard unix tools do and make your own choice.

> For logging request, since we haven't implemented response, I cannot log 
> the status of the request and the size of the response?, Should I skip 
> them?

You don't need to implement logging as part of HW#4.  That would make
more sense to be included in the final project.

-Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 478 bytes
Desc: not available
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20111114/dcee1a9c/attachment.pgp>


More information about the cs631apue mailing list