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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rpcgen.ms

?? RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
?? MS
?? 第 1 頁 / 共 3 頁
字號(hào):
.\".\" 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区在线| 亚洲电影第三页| 国产伦精品一区二区三区视频青涩| 欧美日韩在线观看一区二区| 国产精品久久久久影院亚瑟| 成人动漫一区二区三区| 中文字幕成人av| 99riav久久精品riav| 国产欧美视频在线观看| 97久久精品人人做人人爽50路 | 日韩vs国产vs欧美| 欧美日韩国产美女| 精品影院一区二区久久久| 精品国内片67194| 懂色av中文字幕一区二区三区| 中文字幕一区二区三区不卡在线 | 欧美国产综合一区二区| 成人av电影观看| 亚洲综合男人的天堂| 欧美精品1区2区| 国模套图日韩精品一区二区| 欧美激情综合五月色丁香| 99国产精品国产精品久久| 亚洲综合色噜噜狠狠| 欧美一区二区三区色| 粉嫩蜜臀av国产精品网站| 亚洲韩国一区二区三区| 26uuu欧美日本| 9色porny自拍视频一区二区| 亚洲国产欧美在线| 久久久亚洲午夜电影| 在线中文字幕一区| 国产一区二区在线影院| 亚洲免费电影在线| 欧美电影免费提供在线观看| 97精品国产97久久久久久久久久久久| 精品美女在线观看| 91色|porny| 韩国毛片一区二区三区| 亚洲视频图片小说| 精品国产一区二区三区av性色| 日本在线不卡视频| 国产欧美日韩综合精品一区二区| 国产成人在线色| 亚洲国产你懂的| 国产欧美精品一区二区三区四区| 国产成人精品亚洲午夜麻豆| 亚洲午夜影视影院在线观看| 国产亚洲人成网站| 69堂精品视频| 91色porny在线视频| 国产在线精品不卡| 亚洲va中文字幕| 中文字幕一区二区三区蜜月 | 亚洲欧美日韩一区二区| 欧美电影免费观看高清完整版在线| 亚洲精品国产一区二区精华液| 亚洲自拍另类综合| 国产成人av电影免费在线观看| 欧美大肚乱孕交hd孕妇| 99久久99久久精品免费观看| 免费在线观看日韩欧美| 亚洲人成影院在线观看| 国产精品色噜噜| 日韩欧美电影在线| 欧美三级三级三级| 在线免费精品视频| 一本大道久久a久久综合| 国产成人在线视频网站| 国产乱国产乱300精品| 毛片av一区二区| 免费成人结看片| 日韩二区三区在线观看| 天天综合色天天| 亚洲国产精品尤物yw在线观看| 日韩午夜激情电影| 91麻豆精品91久久久久同性| 在线亚洲精品福利网址导航| 99国内精品久久| 99国产精品久| 日本道色综合久久| 日本精品视频一区二区三区| 一本到不卡免费一区二区| av中文字幕亚洲| 91香蕉视频污在线| 91免费观看国产| 91久久一区二区| 欧美日韩三级一区| 欧美一区二区人人喊爽| 日韩视频永久免费| 精品sm捆绑视频| 亚洲已满18点击进入久久| 亚洲精品乱码久久久久久| 一区二区三区中文字幕精品精品| 91精品国产黑色紧身裤美女| 日韩欧美在线综合网| 日韩视频在线观看一区二区| 精品国产乱码久久久久久夜甘婷婷 | 欧美色成人综合| 欧美精品丝袜中出| 欧美www视频| 久久久国产一区二区三区四区小说| 色综合色狠狠综合色| 欧美在线你懂得| 日韩一级免费观看| 久久久影视传媒| 成人欧美一区二区三区白人| 亚洲宅男天堂在线观看无病毒| 国产视频一区二区在线观看| 国产精品久久看| 亚洲视频免费在线| 日韩精品视频网站| 久久99国产精品尤物| 99热精品国产| 555夜色666亚洲国产免| 国产婷婷一区二区| 亚洲精品国产精品乱码不99| 日日骚欧美日韩| 高清av一区二区| 欧美日韩视频不卡| 国产情人综合久久777777| 一区二区三区不卡视频| 久99久精品视频免费观看| 国产精品88av| 欧美日韩精品三区| 国产三级精品视频| 国产拍揄自揄精品视频麻豆| 精品在线亚洲视频| 日韩电影免费在线看| 日韩亚洲欧美综合| 中文字幕一区二区三| 日韩不卡一区二区三区| 91蝌蚪国产九色| 精品国产免费视频| 亚洲妇女屁股眼交7| 国产91丝袜在线播放0| 制服丝袜一区二区三区| 中文字幕一区二区视频| 久久精品99国产精品日本| 色综合 综合色| 国产午夜亚洲精品不卡| 日本视频在线一区| 在线亚洲人成电影网站色www| 99这里只有久久精品视频| 日韩欧美一二区| 亚洲激情校园春色| 播五月开心婷婷综合| 精品盗摄一区二区三区| 图片区日韩欧美亚洲| 色噜噜狠狠成人网p站| 国产精品人妖ts系列视频| 麻豆精品一区二区综合av| 欧美日韩黄视频| 一区二区三区欧美在线观看| 国产精品 欧美精品| 日韩欧美一区二区不卡| 天堂成人免费av电影一区| 一本久道久久综合中文字幕| 国产精品国产三级国产aⅴ原创 | 99久久免费精品| 久久精品一区二区三区不卡| 麻豆久久久久久| 91精品国产色综合久久久蜜香臀| 制服.丝袜.亚洲.中文.综合| 日韩一区在线播放| 成人看片黄a免费看在线| 国产午夜精品一区二区三区四区| 国产精品三级视频| av亚洲精华国产精华| 国产偷国产偷亚洲高清人白洁| 亚洲欧美成人一区二区三区| 不卡视频免费播放| 国产欧美视频在线观看| 国产91色综合久久免费分享| 国产婷婷色一区二区三区| 国产精品一区二区三区乱码| xf在线a精品一区二区视频网站| 亚洲三级小视频| 97久久人人超碰| 亚洲精品乱码久久久久久| 欧美视频在线一区二区三区 | 国产suv一区二区三区88区| 精品少妇一区二区三区在线播放| 中文字幕在线不卡视频| 国产99一区视频免费| 国产精品视频在线看| 97精品国产97久久久久久久久久久久 | 亚洲天堂免费看| 91免费看视频| 日韩中文字幕区一区有砖一区 | 青娱乐精品视频| 日韩一区二区精品在线观看| 久草热8精品视频在线观看| 精品久久久网站| 成人一道本在线| 亚洲一区中文在线| 日韩丝袜情趣美女图片| 国产精品香蕉一区二区三区| 日韩一区在线免费观看| 欧美私人免费视频|