Added check to functions that call for a client connection

If the client connection is unsuccessful, errno is set to EBADMSG
and the funciton returns to its caller.

Changed man pages accordingly.