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

📄 readme

📁 this gives details of the network programming
💻
字号:
Simple RPC program.This RPC program supports 2 remote procedures:	add : adds 2 ints and returns the int sum.	sub : returns the difference of 2 ints (returns an int).FILES:simp.x: this is the RPC protocol definition file. Although it looks like        'C', it is not! This file is run through the C preprocessor and	the result is processed by rpcgen. rpcgen will create a header	file named simp.h containing data structure definitions and	function prototypes for the C code generated. The generated	C code is created in the files simp_clnt.c (which contains the	client stubs) and simp_svc.c (which contains the main program	for the server). rpcgen also creates any needed XDR filter functions	in the file simp_xdr.csimpclient.c: the main client program. I had to write this (although	running "rpcgen -C -Sc" creates a template for this code). 	This client just calls each of the remote procedures once and	prints out the results. Remember that when calling the client	stubs, you must pass pointers and the return value is a pointer.	When in doubt - look at the client stubs and see what they expect!simpservices.c: the actual remote procedures. I had to write these, 	although "rpcgen -C -Ss" is a great start. The important thing	here is to make sure the functions your create expect the	right kind of parameters and return the right thing. With RPC,	everything has to be a pointer - the procedure argument is 	a pointer to the type your declared in the .x file, and the 	return value is a pointer to the return type you declare in	the .x file.simp_svc.c: the server main program, this was created by rpcgen.simp_clnt.c: the client stubs, this file was created by rpcgen.simp_xdr.c: the XDR filter(s) needed for this application, this file	was created by rpcgen.IMPORTANT: You have to use rpcgen -C (generates ANSI C code instead of K&R). !!!

⌨️ 快捷键说明

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