calc_client size enforcement, error handling

Reviewed the recieve buffer sizes and made sure that
they met the specs (MAXLINE = 2000, MAXRECV = 20).

Improved error handling to check all cases and exit
cleanly.