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

232 AppendixD
Migration From PTOP to NetIPC and RPM
Example: Client-Server Application
if result <> 0 then
ERROR( 'Couldn't shut down dest.', result );
{-------------------------------------------------------------}
{ Each pass of this loop receives one name from the client, }
{ and looks up the name. If the name is found, an accept }
{ indication is sent back to the client, followed by the name }
{ information. If the name is not found, a reject indication }
{ is returned to the client. The server will remain in this }
{ loop until it is terminated by the client. On termination, }
{ the vc connection will automatically be shut down. }
{-------------------------------------------------------------}
repeat
RECV( vcdesc, buf, namelength, result );
if result <> 0 then
ERROR( 'Receive from client failed.', result );
for i := 1 to namelength do
name[i] := buf[i];
FIND_NAME( name, info, found );
if found then
begin
buf[1] := chr(indaccept);
IPCSEND( vcdesc, buf, 1, , , result );
if result <> 0 then
ERROR( 'Send to client failed.', result );
IPCSEND( vcdesc, info, infolength, , , result );
if result <> 0 then
ERROR( 'Send to client failed.', result );
end
else{not found}
begin
buf[1] := chr(indreject);
IPCSEND( vcdesc, buf, 1, , , result );
if result <> 0 then
ERROR( 'Send to client failed', result );
end;
until false;
1:{error exit}
end.