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

158 Chapter4
NetIPC Examples
Example 3
{------------------------------------}
{ Echo the same buffer. }
{------------------------------------}
IPCSend (p_vc_desc,buffer,buffer_len,,,result);
if result = 0 then i:=i+1;
end;{if}
end; {while}
end;
end;{echo }
PROCEDURE shutdown_connection;
var
buffer : buffer_type;
buffer_len : integer;
begin
{------------------------------------}
{ End of connection. }
{ Wait for X25CHECK to CLEAR first }
{------------------------------------}
if result = 0 then
begin
buffer_len := 1;
IPCRecv (p_vc_desc,buffer,buffer_len,,,result);
{------------------------------------}
{ This IPCRECV should complete with }
{ an error indicating a CLEAR recvd. }
{------------------------------------}
if result = c_clear_rcvd then
{------------------------------------}
{ We can shutdown the vc descriptor }
{------------------------------------}
IPCShutdown (p_vc_desc,,,result);
end;
end;{shutdown_connection}
PROCEDURE shutdown_call_desc;
begin {shutdown_call_desc}
IPCShutdown (p_call_desc,,,result);
end; {shutdown_call_desc}
begin {main server}
CREATE_DESCRIPTOR;
while true do {endless loop}
begin
ECHO;
SHUTDOWN_CONNECTION;
end;
SHUTDOWN_CALL_DESC;
end. {main server}