⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.c

📁 这是一个简单的模拟银行存取款的例子,目的是了解如何开发RPC服务程序.代码在LINUX下测试运行通过
💻 C
字号:
#include "account.h"int total =  10000;int * deposit_1_svc(int *argp, struct svc_req *rqstp){  static int result;  total = total + *argp;  result = total;  printf("new total = %d \n",total);  return &result;}int * withdraw_1_svc(int *argp, struct svc_req *rqstp){  static int result;  total = total - *argp;  result = total;  printf("new total = %d \n",total);  return &result;  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -