home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / n / n001 / 2.ddi / EXAMPLES / DIAG / SERVER / RPROC.C next >
Encoding:
C/C++ Source or Header  |  1989-12-11  |  2.2 KB  |  81 lines

  1. /*                                                                            *
  2.  *                                                                            *
  3.  *                  Copyright 1987, 1988, 1989 Netwise, Inc.                  *
  4.  *                              All Rights Reserved                           *
  5.  *   This software contains information which is proprietary to and a trade   *
  6.  *   secret of Netwise, Inc. It is not to be used, reproduced, or disclosed   *
  7.  *   except as authorized in your license agreement.                          *
  8.  *                                                                            *
  9.  *                          Restricted Rights Legend                          *
  10.  *   Use, duplication,  or  disclosure  by the  Government  is  subject  to   *
  11.  *   restrictions as set forth in subparagraph (c)(1)(ii) of the Rights  in   *
  12.  *   Technical Data and  Computer Software clause  at 252.227-7013, or  the   *
  13.  *   equivalent Government clause for other agencies.                         *
  14.  *   Contractor: Netwise, Inc., Boulder, CO 80301 USA                         *
  15.  *                                                                            *
  16.  */ 
  17. /*
  18.  * File: diag\server\rproc.c
  19.  *
  20.  * This example runs in the following environment:
  21.  *    NetWare RPC 1.0, NetWare 2.1 or higher, DOS 3.3
  22.  *
  23.  *  This file contains the remote procedures for the diag example. 
  24.  */ 
  25.  
  26. #include <stdio.h>
  27. #include "diag.h"    /* server header file, created by RPC compiler */
  28.  
  29. int
  30. nonper(cnt)
  31. int cnt;
  32. {
  33.  
  34.    printf("SERVER: nonper() called\n");
  35.  
  36.    return(cnt);
  37. }
  38.  
  39. int start()
  40. {
  41.    printf("SERVER: persistent connection accepted\n");
  42.  
  43.    return(0);
  44. }
  45.  
  46. int stop()
  47. {
  48.  
  49.    printf("SERVER: persistent connection closing\n");
  50.  
  51.    return(0);
  52. }
  53.  
  54. int
  55. simple( l1, d1, c1, l2, d2, c2)
  56. long l1, *l2;
  57. double d1, *d2;
  58. char c1, *c2;
  59. {
  60.    printf("SERVER: simple() called\n");
  61.    *l2 = l1;
  62.    *d2 = d1;
  63.    *c2 = c1;
  64.  
  65.    return (0);
  66. }
  67.  
  68. int
  69. complex( cmplx1, cmplx2 )
  70. struct cmplx_type *cmplx1, *cmplx2;
  71. {
  72.    printf("SERVER: complex() called\n");
  73.  
  74.    cmplx2->link = cmplx1->link;
  75.    cmplx2->length = cmplx1->length;
  76.    strcpy(cmplx2->data, cmplx1->data);
  77.  
  78.    return (0);
  79. }
  80.  
  81.