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

164 Chapter4
NetIPC Examples
Example 4
begin
if msg[i] <> (i mod 100) then
writeln ('receive error data : #',i:1,' ',msg[i]);
i := i + 1;
end;
(************************ IPCSEND *************************************)
(* Now send a single vectored message to the local side *)
data := 'ok last one.';
dlen := 12;
writeln;
writeln('***** IPCSEND last message');
ipcsend ( cd_local, data, dlen, , , result );
if result <> 0 then
writeln ('ipcsend failed', result);
(************************ IPCRECV (skip error #67) ********************)
(* wait for remote side to shutdown first *)
(* receive an error code #67 *)
dlen := 1;
writeln;
writeln('***** IPCRECV ');
ipcrecv ( cd_local, data, dlen, , , result );
(* receive an error code #67 *)
if result <> 67 then
writeln('IPCRECV failed ', result:1);
(************************ IPCSHUTDOWN *********************************)
(* shutdown the local connection descriptor *)
writeln;
writeln('***** IPCSHUTDOWN (cd)');
ipcshutdown ( cd_local, , , result );
if result <> 0 then
writeln ('ipcshutdown cd_local failed', result);
(************************ IPCSHUTDOWN *********************************)
(* shutdown the local socket descriptor *)
writeln;
writeln('***** IPCSHUTDOWN (sd)');
ipcshutdown ( sd_local, , , result );
if result <> 0 then
writeln ('ipcshutdown sd_local failed', result);
end.