[ee122] Is stdin a stream?
Richard Schmidt
huntingtonsurfca at gmail.com
Mon Sep 17 16:55:43 PDT 2007
I'm putting the input into a buffer using fgets (which will automatically
tie everything up for me nicely), but if EOF is returned first or an error
is returned, the retrn value is a null pointer.
feof() takes a stream in and looks for an EOF flag, but I don't know if we
can treat stdin as an argument to that function.
also, what should the client do if a user types in a partial message and
then hits the EOF key? should we assume the user wants to break the
operation/connection or should we send out the data before the EOF key?
finally, if an error does occur, should handling things gracefully mean
trying to re-establish a connection, asking the user if they want to try and
re-establish, returning 1 (error) or just returning 0 (success)?
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/ee122/attachments/20070917/f6a63e4e/attachment.html
More information about the ee122
mailing list