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

146 Chapter4
NetIPC Examples
Example 2
location := 'bigblue';
ipcdest ( 3, location, 7, 4, adrs, 2, , , dd, result );
if result <> 0 then
writeln ('ipcdest failed ' , result );
{ Connect to the local socket using the destination descriptor. }
ipcconnect ( sd_remote, dd, , , cd_remote, result );
if result <> 0 then
writeln ('ipcconnect failed ', result );
{ remote side does a receive to complete the connection }
ipcrecv ( cd_remote, , , , , result );
if result <> 0 then
writeln ('ipcrecv to complete connection failed');
{ set up vectors ready for sending and receiving data }
$if 'native_mode'$
vd.d_desc_dataptr1 := globalanyptr ( addr ( messag1 ) );
vd.d_desc_dataptr2 := globalanyptr ( addr ( messag2 ) );
$else$
vd.d_desc_dst1 := 0; { this is ignored }
vd.d_desc_dataptr1 := baddress ( messag1 );
vd.d_desc_dst2 := 0; { this is ignored }
vd.d_desc_dataptr2 := baddress ( messag2 );
$endif$
vd.d_desc_type1 := DESC_TYPE;
vd.d_desc_type2 := DESC_TYPE;
flags := [ F_VECTORED ];
{ send a non-vectored message to the local side }
messag1 := '40 four oh forty XL 40 four tens fortify';
ipcsend ( cd_remote, messag1, 40, , , result );
if result <> 0 then
writeln ('ipcsend failed');
{ receive a message in a single vector }
messag1 := ' '; { 46 }
vd.d_desc_len1 := 46; { max we are willing to receive }
dlen := DESC_LEN;
ipcrecv ( cd_remote, vd, dlen, flags, , result );
if result <> 0 then
writeln ('ipcrecv data failed');
if dlen <> 1 then
writeln ('dlen was not = 1');
{ Check that the correct data was received }
expect := '.';
error := false;
for i := 1 to dlen do