亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rpcgen.ms

?? RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
?? MS
?? 第 1 頁 / 共 3 頁
字號:
.\".\" Must use  --  tbl -- for this one.\".\" @(#)rpcgen.ms	2.2 88/08/04 4.0 RPCSRC.de BT.if \\n%=1 .tl ''- % -''...ND.\" prevent excess underlining in nroff.if n .fp 2 R.OH '\fBrpcgen\fP Programming Guide''Page %'.EH 'Page %''\fBrpcgen\fP Programming Guide'.if \\n%=1 .bp.SH\&\fBrpcgen\fP Programming Guide.NH 0\&The \fBrpcgen\fP Protocol Compiler.IX rpcgen "" \fIrpcgen\fP "" PAGE MAJOR.LP.IX RPC "" "" \fIrpcgen\fPThe details of programming applications to use Remote Procedure Calls can be overwhelming.  Perhaps most daunting is the writing of the XDR routines necessary to convert procedure arguments and results into their network format and vice-versa.  .LPFortunately, .I rpcgen(1) exists to help programmers write RPC applications simply and directly..I rpcgen does most of the dirty work, allowing programmers to debug the  main  features of their application, instead of requiring them tospend most of their time debugging their network interface code..LP.I rpcgen is a  compiler.  It accepts a remote program interface definition writtenin a language, called RPC Language, which is similar to C.  It produces a Clanguage output which includes stub versions of the client routines, aserver skeleton, XDR filter routines for both parameters and results, and aheader file that contains common definitions. The client stubs interfacewith the RPC library and effectively hide the network from their callers.The server stub similarly hides the network from the server procedures thatare to be invoked by remote clients..I rpcgen 'soutput files can be compiled and linked in the usual way.  The developerwrites server procedures\(emin any language that observes Sun callingconventions\(emand links them with the server skeleton produced by.I rpcgen to get an executable server program.  To use a remote program, a programmerwrites an ordinary main program that makes local procedure calls to the client stubs produced by.I rpcgen .Linking this program with .I rpcgen 'sstubs creates an executable program.  (At present the main program must be written in C)..I rpcgen options can be used to suppress stub generation and to specify the transportto be used by the server stub..LPLike all compilers, .I rpcgen reduces development timethat would otherwise be spent coding and debugging low-level routines.All compilers, including .I rpcgen ,do this at a small cost in efficiencyand flexibility.  However,   many compilers allow  escape  hatches forprogrammers to  mix low-level code with  high-level code. .I rpcgen is no exception.  In speed-critical applications, hand-written routines can be linked with the .I rpcgen output without any difficulty.  Also, one may proceed by using.I rpcgen output as a starting point, and then rewriting it as necessary.(If you need a discussion of RPC programming without.I rpcgen ,see the.I "Remote Procedure Call Programming Guide)\..NH 1\&Converting Local Procedures into Remote Procedures.IX rpcgen "local procedures" \fIrpcgen\fP.IX rpcgen "remote procedures" \fIrpcgen\fP.LPAssume an application that runs on a single machine, one which we want to convert to run over the network.  Here we will demonstrate such a conversion by way of a simple example\(ema program that prints a message to the console:.ie t .DS.el .DS L.ft I/* * printmsg.c: print a message on the console */.ft CW#include <stdio.h>main(argc, argv)	int argc;	char *argv[];{	char *message;	if (argc < 2) {		fprintf(stderr, "usage: %s <message>\en", argv[0]);		exit(1);	}	message = argv[1];	if (!printmessage(message)) {		fprintf(stderr, "%s: couldn't print your message\en",			argv[0]);		exit(1);	} 	printf("Message Delivered!\en");	exit(0);}.ft I/* * Print a message to the console. * Return a boolean indicating whether the message was actually printed. */.ft CWprintmessage(msg)	char *msg;{	FILE *f;	f = fopen("/dev/console", "w");	if (f == NULL) {		return (0);	}	fprintf(f, "%s\en", msg);	fclose(f);	return(1);}.DE.LPAnd then, of course:.ie t .DS.el .DS L.ft CWexample%  \fBcc printmsg.c -o printmsg\fPexample%  \fBprintmsg "Hello, there."\fPMessage delivered!example%.DE.LPIf  .I printmessage() was turned into  a remote procedure,then it could be  called from anywhere in   the network.  Ideally,  one would just  like to stick   a  keyword like  .I remote in  front  of aprocedure to turn it into a  remote procedure.  Unfortunately,we  have to live  within the  constraints of  the   C language, since it existed   long before  RPC did.  But   even without language support, it's not very difficult to make a procedure remote..LPIn  general, it's necessary to figure  out  what the types are forall procedure inputs and outputs.  In  this case,   we  have a procedure.I printmessage() which takes a  string as input, and returns  an integeras output.  Knowing  this, we can write a  protocol specification in RPClanguage that  describes the remote  version of .I printmessage ().Here it is:.ie t .DS.el .DS L.ft I/* * msg.x: Remote message printing protocol */.ft CWprogram MESSAGEPROG {	version MESSAGEVERS {		int PRINTMESSAGE(string) = 1;	} = 1;} = 99;.DE.LPRemote procedures are part of remote programs, so we actually declaredan  entire  remote program  here  which contains  the single procedure.I PRINTMESSAGE .This procedure was declared to be  in version  1 of theremote program.  No null procedure (procedure 0) is necessary because.I rpcgen generates it automatically..LPNotice that everything is declared with all capital  letters.  This isnot required, but is a good convention to follow..LPNotice also that the argument type is \*Qstring\*U and not \*Qchar *\*U.  Thisis because a \*Qchar *\*U in C is ambiguous.  Programmers usually intend itto mean  a null-terminated string   of characters, but  it  could alsorepresent a pointer to a single character or a  pointer to an array ofcharacters.  In  RPC language,  a  null-terminated  string is unambiguously called a \*Qstring\*U..LPThere are  just two more things to  write.  First, there is the remoteprocedure itself.  Here's the definition of a remote procedureto implement the.I PRINTMESSAGEprocedure we declared above:.ie t .DS.el .DS L.vs 11.ft I/* * msg_proc.c: implementation of the remote procedure "printmessage" */.ft CW#include <stdio.h>#include <rpc/rpc.h>    /* \fIalways needed\fP  */#include "msg.h"        /* \fIneed this too: msg.h will be generated by rpcgen\fP */.ft I/* * Remote verson of "printmessage" */.ft CWint *printmessage_1(msg)	char **msg;{	static int result;  /* \fImust be static!\fP */	FILE *f;	f = fopen("/dev/console", "w");	if (f == NULL) {		result = 0;		return (&result);	}	fprintf(f, "%s\en", *msg);	fclose(f);	result = 1;	return (&result);}.vs.DE.LPNotice here that the declaration of the remote procedure.I printmessage_1() differs from that of the local procedure.I printmessage() in three ways:.IP  1.It takes a pointer to a string instead of a string itself.  Thisis true of all  remote procedures:  they always take pointers to  theirarguments rather than the arguments themselves..IP  2.It returns a pointer to an  integer instead of  an integer itself. This isalso generally true of remote procedures: they always return a pointerto their results..IP  3.It has an \*Q_1\*U appended to its name.  In general, all remoteprocedures called by .I rpcgen are named by  the following rule: the name in the program  definition  (here .I PRINTMESSAGE )is converted   to alllower-case letters, an underbar (\*Q_\*U) is appended to it, andfinally the version number (here 1) is appended..LPThe last thing to do is declare the main client program that will callthe remote procedure. Here it is:.ie t .DS.el .DS L.ft I/* * rprintmsg.c: remote version of "printmsg.c" */.ft CW#include <stdio.h>#include <rpc/rpc.h>     /* \fIalways needed\fP  */#include "msg.h"         /* \fIneed this too: msg.h will be generated by rpcgen\fP */main(argc, argv)	int argc;	char *argv[];{	CLIENT *cl;	int *result;	char *server;	char *message;	if (argc < 3) {		fprintf(stderr, "usage: %s host message\en", argv[0]);		exit(1);	}.ft I	/*	 * Save values of command line arguments 	 */.ft CW	server = argv[1];	message = argv[2];.ft I	/*	 * Create client "handle" used for calling \fIMESSAGEPROG\fP on the	 * server designated on the command line. We tell the RPC package	 * to use the "tcp" protocol when contacting the server.	 */.ft CW	cl = clnt_create(server, MESSAGEPROG, MESSAGEVERS, "tcp");	if (cl == NULL) {.ft I		/*		 * Couldn't establish connection with server.		 * Print error message and die.		 */.ft CW		clnt_pcreateerror(server);		exit(1);	}.ft I	/*	 * Call the remote procedure "printmessage" on the server	 */.ft CW	result = printmessage_1(&message, cl);	if (result == NULL) {.ft I		/*		 * An error occurred while calling the server. 	 	 * Print error message and die.		 */.ft CW		clnt_perror(cl, server);		exit(1);	}.ft I	/*	 * Okay, we successfully called the remote procedure.	 */.ft CW	if (*result == 0) {.ft I		/*		 * Server was unable to print our message. 		 * Print error message and die.		 */.ft CW		fprintf(stderr, "%s: %s couldn't print your message\en", 			argv[0], server);			exit(1);	} .ft I	/*	 * The message got printed on the server's console	 */.ft CW	printf("Message delivered to %s!\en", server);}.DEThere are two things to note here:.IP  1..IX "client handle, used by rpcgen" "" "client handle, used by \fIrpcgen\fP"First a client \*Qhandle\*U is created using the RPC library routine.I clnt_create ().This client handle will be passed  to the stub routineswhich call the remote procedure..IP  2.The remote procedure  .I printmessage_1() is called exactly  the same way as it is  declared in .I msg_proc.c except for the inserted client handle as the first argument..LPHere's how to put all of the pieces together:.ie t .DS.el .DS L.ft CWexample%  \fBrpcgen msg.x\fPexample%  \fBcc rprintmsg.c msg_clnt.c -o rprintmsg\fPexample%  \fBcc msg_proc.c msg_svc.c -o msg_server\fP.DETwo programs were compiled here: the client program .I rprintmsg and the server  program .I msg_server .Before doing this  though,  .I rpcgen was used to fill in the missing pieces.  .LPHere is what .I rpcgen did with the input file .I msg.x :.IP  1.It created a header file called .I msg.h that contained.I #define 'sfor.I MESSAGEPROG ,.I MESSAGEVERS and    .I PRINTMESSAGE for use in  the  other modules..IP  2.It created client \*Qstub\*U routines in the.I msg_clnt.c file.   In this case there is only one, the .I printmessage_1() that was referred to from the.I printmsg client program.  The name  of the output file forclient stub routines is always formed in this way:  if the name of theinput file is  .I FOO.x ,the   client  stubs   output file is    called.I FOO_clnt.c ..IP  3.It created  the  server   program which calls   .I printmessage_1() in.I msg_proc.c .This server program is named  .I msg_svc.c .The rule for naming the server output file is similar  to the previous one:  for an input  file   called  .I FOO.x ,the   output   server   file is  named

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日本乱大交xxxxx| 国产精品午夜春色av| 久久久久亚洲综合| 亚洲少妇最新在线视频| 免费一区二区视频| www.色综合.com| 欧美一级在线免费| 亚洲精品免费一二三区| 国产激情视频一区二区在线观看| 欧美在线一二三| 中文字幕精品综合| 日本欧美加勒比视频| 91久久国产综合久久| 亚洲国产精品成人综合| 麻豆精品在线播放| 欧美三级在线看| 亚洲精品日日夜夜| 成人深夜在线观看| 久久久久综合网| 奇米综合一区二区三区精品视频| 色综合久久九月婷婷色综合| 国产偷国产偷亚洲高清人白洁| 日本欧美在线观看| 欧美日韩精品电影| 一级中文字幕一区二区| 色综合久久99| 亚洲色大成网站www久久九九| 成人少妇影院yyyy| 久久久久久免费| 国产一区亚洲一区| 欧美va亚洲va在线观看蝴蝶网| 亚洲1区2区3区4区| 欧美日韩精品高清| 三级成人在线视频| 91精品国产综合久久蜜臀| 亚洲18女电影在线观看| 欧美日本韩国一区| 日本在线不卡视频一二三区| 欧美美女激情18p| 婷婷综合在线观看| 欧美一区日本一区韩国一区| 日本欧美大码aⅴ在线播放| 欧美精品高清视频| 精品一区二区三区的国产在线播放| 欧美一区二区三区免费| 另类欧美日韩国产在线| 欧美精品一区在线观看| 国产一区二区三区最好精华液| 国产夜色精品一区二区av| 国内精品久久久久影院薰衣草| 国产三级精品视频| 99国产精品99久久久久久| 亚洲综合激情网| 91麻豆精品国产91久久久久久 | 国产主播一区二区三区| 精品福利av导航| 成人爱爱电影网址| 一区二区三区欧美| 制服丝袜亚洲播放| 国产馆精品极品| 亚洲日本护士毛茸茸| 欧美日韩日日骚| 经典一区二区三区| 亚洲乱码精品一二三四区日韩在线| 欧美午夜在线一二页| 蜜桃视频免费观看一区| 欧美国产乱子伦| 欧美日韩国产成人在线91| 极品瑜伽女神91| 成人免费在线观看入口| 欧美一区三区四区| 99久久综合国产精品| 日韩高清一区在线| 亚洲欧美欧美一区二区三区| 日韩精品一区二区在线观看| 99久久精品免费看国产免费软件| 日韩电影免费一区| 国产精品国产三级国产| 91精品国产综合久久福利软件| 丁香婷婷综合激情五月色| 偷拍一区二区三区四区| 国产精品天干天干在线综合| 欧美一卡二卡在线观看| 91老师片黄在线观看| 久久99热99| 亚洲成年人网站在线观看| 国产精品视频一二三区 | 精品91自产拍在线观看一区| 99热在这里有精品免费| 韩国一区二区三区| 亚洲成人在线观看视频| 国产精品国产三级国产普通话三级| 欧美一区二区三区影视| 91久久精品午夜一区二区| 国产剧情一区二区| 蜜桃视频一区二区| 首页国产欧美久久| 亚洲一二三区在线观看| 亚洲欧洲制服丝袜| 国产精品久久久久一区二区三区共| 日韩免费看的电影| 在线不卡的av| 欧美人妇做爰xxxⅹ性高电影| 97精品久久久久中文字幕| 95精品视频在线| 日韩国产精品91| 亚洲va天堂va国产va久| 亚洲人成在线播放网站岛国| 中文字幕成人网| 国产视频在线观看一区二区三区| 日韩美女在线视频| 欧美一级精品大片| 欧美一区二区视频免费观看| 欧美日韩一区高清| 欧美亚洲免费在线一区| 欧美性色黄大片手机版| 91成人免费在线视频| 色偷偷一区二区三区| 色综合中文字幕国产 | 午夜精品久久久久久久| 亚洲午夜在线视频| 一区二区在线看| 亚洲美腿欧美偷拍| 亚洲国产中文字幕在线视频综合| 亚洲一区二区三区四区五区黄| 亚洲图片有声小说| 日韩不卡一区二区| 老司机免费视频一区二区三区| 老司机精品视频一区二区三区| 久久精品99国产精品| 国产一区二区免费在线| 成人性生交大片| 一本色道久久综合狠狠躁的推荐| 欧洲视频一区二区| 欧美一区二区三区免费在线看| 日韩视频免费观看高清完整版 | 激情欧美一区二区| 国模套图日韩精品一区二区| 国产盗摄一区二区| 一本大道久久a久久综合婷婷| 欧美亚日韩国产aⅴ精品中极品| 欧美精品高清视频| 国产清纯白嫩初高生在线观看91 | 亚洲欧美视频在线观看| 午夜久久电影网| 国产一区二区在线视频| 成人精品一区二区三区四区 | 久久精品一区二区三区四区| 中文字幕第一区综合| 亚洲午夜国产一区99re久久| 精品一区二区三区久久久| 不卡一区二区三区四区| 欧美日韩在线电影| 久久免费看少妇高潮| 亚洲日本一区二区三区| 免费视频一区二区| 99久久精品国产一区二区三区| 日本道色综合久久| 精品国产一区二区三区久久影院 | 国产精品天天看| 天堂久久一区二区三区| 国产高清视频一区| 精品视频一区二区不卡| 国产日韩影视精品| 日本美女一区二区三区| 色婷婷亚洲综合| 国产亚洲污的网站| 免费观看日韩电影| 日本精品一区二区三区四区的功能| 欧美刺激脚交jootjob| 亚洲一二三四在线| 91在线观看污| 久久综合九色综合久久久精品综合| 亚洲在线视频网站| 成人午夜激情片| 欧美v国产在线一区二区三区| 一区二区欧美视频| 成人app网站| 久久色在线视频| 秋霞影院一区二区| 欧美伊人精品成人久久综合97| 国产精品视频一区二区三区不卡| 免费一级片91| 91精品国产综合久久久久久久久久| 综合激情网...| 国产iv一区二区三区| 精品粉嫩超白一线天av| 日韩高清在线不卡| 欧美日韩激情一区| 亚洲最大的成人av| 99久久国产综合精品色伊| 国产精品久久久久一区| 国产suv精品一区二区6| 国产蜜臀97一区二区三区| 国产一区欧美一区| 久久久久久久久久久久久久久99 | 国产亚洲精品久| 激情综合网av| 久久久夜色精品亚洲| 国产激情一区二区三区|