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 229
Migration From PTOP to NetIPC and RPM
Example: Client-Server Application
RSERVER: Sample NetIPC/RPM Slave Program
$standard_level 'HP3000', uslinit$ program rserver( input, output );
{-------------------------------------------------------------------}
{ }
{ RSERVER: Sample NetIPC/RPM Slave Program }
{ }
{-------------------------------------------------------------------}
{ }
{ PURPOSE: }
{ The RCLIENT and RSERVER programs illustrate the use of the NetIPC }
{ and RPM services to implement a simple name server application. }
{ See the RCLIENT program for details. }
{-------------------------------------------------------------------}
label 1; {error exit }
const namelength = 20; {all lengths in bytes }
infolength = 60;
maxnodelength = 51;
socketnamelength= 8; {returned by IPCNAME }
callsocket = 3; {IPCCREATE socket type }
tcpprotocol = 4; {IPCCREATE protocol type}
indaccept = 0; {accept indication }
indreject = 1; {reject indication }
type shortint = -32768..32767;
msgtype = packed array[1..30] of char;
nametype = packed array[1..namelength] of char;
infotype = packed array[1..infolength] of char;
buftype = array [1..80] of char;
var clientsockname: packed array[1..socketnamelength] of char;
clientnode: packed array[1..maxnodelength] of char;
name: nametype;
info: infotype;
buf: buftype;
clientsocklength: integer;
clientnodelength: integer;
socketdesc: integer;
destdesc: integer;
vcdesc: integer;
result: integer;
i: integer;
found: boolean;
procedure RPMGETSTRING; intrinsic; {RPM intrinsic }
procedure IPCCREATE; intrinsic; {NetIPC intrinsics}
procedure IPCLOOKUP; intrinsic;
procedure IPCCONNECT; intrinsic;
procedure IPCRECV; intrinsic;
procedure IPCSEND; intrinsic;
procedure IPCSHUTDOWN; intrinsic;
procedure ERROR( msg: msgtype; result: integer );