91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 28KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-26
  • 語言: C/C++
  • 標簽: rpc??通信例子??

資源簡介

rpc (網絡通信例子)c語言(親自測試過可以使用)

資源截圖

代碼片段和文件信息

/*
?*?This?is?sample?code?generated?by?rpcgen.
?*?These?are?only?templates?and?you?can?use?them
?*?as?a?guideline?for?developing?your?own?functions.
?*/

#include?“test.h“
#include?“stdio.h“

void
testprog_1(char?*host)
{
CLIENT?*clnt;
char?*?*result_1;
char?*?test_1_arg;

#ifndef DEBUG
clnt?=?clnt_create?(host?TESTPROG?VERSION?“udp“);
if?(clnt?==?NULL)?{
clnt_pcreateerror?(host);
exit?(1);
}
#endif /*?DEBUG?*/

result_1?=?test_1(&test_1_arg?clnt);
if?(result_1?==?(char?**)?NULL)?{
clnt_perror?(clnt?“call?failed“);
}
printf(“client?get?message::%s“*result_1);
#ifndef DEBUG
clnt_destroy?(clnt);
#endif ?/*?DEBUG?*/
}


int
main?(int?argc?char?*argv[])
{
char?*host;

if?(argc? printf?(“usage:?%s?server_host\n“?argv[0]);
exit?(1);
}
host?=?argv[1];
testprog_1?(host);
exit?(0);
}

評論

共有 條評論