Home » 2014 » February » 08 » Remote procedure call mechanism

0:10 AM
Remote procedure call mechanism

RPC package has an RPC compiler (rpcgen) that automatically generates the client and server stubs.

RPC package uses XDR (eXternal Data Representation) to represent data sent between client and server stubs.


Remote Date Example

From Stevens Unix Networking book.

Running rpcgen msg.x generates msg.h, msg_clnt.c andmsge_svc.c. The header file is included with both client and server. The respective C source files are linked with client and server code.

Get all the file in this ZIP file

Compiling and running the program


Prompt>ls

msg.x msg_proc.c rprintmsg.c
Prompt>rpcgen msg.x Prompt>ls
msg.h msg_clnt.c msg_svc.c
msg.x msg_proc.c rprintmsg.c
Prompt>cc -o msg_server msg_proc.c msg_svc.c 

msg_proc.c:
msg_svc.c:
Prompt>cc -o rprintmsg rprintmsg.c msg_clnt. c

rprintmsg.c:
msg_clnt.c:
Prompt>./msg_server&

[1] 23501
Prompt>./rprintmsg shankar "Hello shankar"

Hello shankar!
Message delivered to shankar!
Prompt>exit


 
 

Category: Technical Solution | Views: 1699 | Added by: shanky | Rating: 0.0/0

Related blogs


You may also like to see:


[2014-02-11][Technical Solution]
Advanced Encryption Standard (AES) algorithm : an algorithm for encryption and decryption for secure data transfer
[2014-05-02][Technical Solution]
A very basic program in perl scripting
[2014-02-02][Technical Solution]
Free Web space on internet to upload any kind of file!!!
[2024-08-04][Technical Solution]
What is Internet Of Things(IoT) ? Who uses it ? | Advantages in real life
[2015-01-26][Technical Solution]
How to change IP address of windows system

Total comments: 0
ComForm">
avatar