NetIPC 3000/XL Programmer's Reference Manual (5958-8600)
Table Of Contents
- 1 NetIPC Fundamentals
- 2 Cross-System NetIPC
- 3 NetIPC Intrinsics
- 4 NetIPC Examples
- A IPC Interpreter (IPCINT)
- B Cause and Diagnostic Codes
- C ErrorMessages
- D Migration From PTOP to NetIPC and RPM
- E C Program Language Considerations

Appendix D 217
Migration From PTOP to NetIPC and RPM
Example: Client-Server Application
PCLIENT: Sample PTOP Master Program
$standard_level 'HP3000', uslinit$ program pclient( input, output );
{-------------------------------------------------------------------}
{ }
{ PCLIENT: Sample PTOP Master Program }
{ }
{-------------------------------------------------------------------}
{ }
{ PURPOSE: }
{ The PCLIENT and PSERVER programs illustrate the use of the PTOP }
{ service to implement a simple name server application. The user }
{ runs PCLIENT on his local node, and PCLIENT creates PSERVER on }
{ the node which contains the data. The user inputs names to }
{ to PCLIENT, PCLIENT sends the names to PSERVER, PSERVER }
{ looks up the names in its name file, and sends the associated info}
{ for the names back to PCLIENT. }
{ }
{-------------------------------------------------------------------}
{ }
{ INTERACTION: }
{ PTOP is a master-slave protocol. The master PCLIENT sends }
{ requests (PREAD and PWRITE) to the slave PSERVER. The slave }
{ GETs the request from the master and either ACCEPTs them or }
{ REJECTs them. The GET indicates the function requested by the }
{ master, and the ACCEPT transfers the actual data, from the master }
{ for a PWRITE and to the master for a PREAD. REJECT can be used }
{ to reject the master request (used here if the name cannot be }
{ found in the data file. }
{ PCLIENT PSERVER
{
{ get remote node name }
{ POPEN PSERVER on remote node ------> GET }
{ <------- ACCEPT (POPEN) }
{ get name }
{ PWRITE name ---------name----------> GET }
{ < --------------------- ACCEPT name }
{ PREAD info -----------------------> GET }
{ look up name, found info }
{ <---------info--------- ACCEPT info }
{ print info }
{ get name }
{ PWRITE name ---------name----------> GET }
{ < -----------------------ACCEPT }
{ PREAD info -----------------------> GET }
{ look up name, not found }
{ < -----------------------REJECT }
{ print error }
{ . . . }
{ PCLOSE -----------------------> GET }
{ (terminate) }
{-------------------------------------------------------------------}