source: network-demos/rpc_demo/msg_proc.c @ 81f6c2e

4.11network-demos-4-10-branch
Last change on this file since 81f6c2e was e6f3168, checked in by Joel Sherrill <joel.sherrill@…>, on 04/29/00 at 19:53:34

New test from Eric Norum <eric@…> to exercise RPC/XDR.

  • Property mode set to 100644
File size: 430 bytes
Line 
1/*
2 * Server-side implementation of remote procedure calls
3 */
4#include <stdio.h>
5#include "msg.h"
6
7int *
8printmessage_1_svc(char **argp, struct svc_req *rqstp)
9{
10        static int result;
11
12        result = printf ("WOW -- RPC WORKS: `%s'\n", *argp);
13        return &result;
14}
15
16int *
17printnum_1_svc(int *argp, struct svc_req *rqstp)
18{
19        static int  result;
20
21        printf ("The number you sent is %d.\n", *argp);
22        result = *argp * *argp;
23        return &result;
24}
Note: See TracBrowser for help on using the repository browser.