qutils.h


      //  $Id: qutils.h,v 1.4 2002/05/18 22:09:01 vickery Exp $
      
      /*    Header file for utility functions used by both the client and
       *    the server.
       *
       *    $Log: qutils.h,v $
       *    Revision 1.4  2002/05/18 22:09:01  vickery
       *    Added recv_msg to the set of utilities.
       *
       *    Revision 1.3  2002/05/12 00:43:06  vickery
       *    Now write_msg() writes error messages to log file instead of
       *    just returning the error code.
       *
       *    Revision 1.2  2002/05/07 05:06:31  vickery
       *    Added send_msg function.
       *
       *    Revision 1.1  2002/05/06 06:34:07  vickery
       *    Initial revision
       *
       */
      #ifndef __UTILS_H__
      #define __UTILS_H__
      
      #include <errno.h>
      #include <stdio.h>
      #include <string.h>
      #include <unistd.h>
      
      #include "qprotocol.h"
      
      //  Prototypes
      //  ------------------------------------------------------------------
      int read_header ( int,        msg_header_t&                 );
      int read_body   ( int,        msg_header_t,         char *  );
      int recv_msg    ( int,        msg_header_t&,        char**  );
      int write_msg   ( int, const  msg_header_t,   const char *  );
      int send_msg    ( int, const  int32_t,        const char *  );
      
      #endif