Download NS-ARPA/1000 User/Programmer Reference Manual
Transcript
C
C
C
C
C
30
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
After it receives the shutdown “message,” ipc3 will send its
own shutdown “message” to ipc4. IPCRECV is called to receive
this data.
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
write(1,’(“ipc4: waiting to receive shutdown msg (IPCRecv).”)’)
flags = 0
CALL IPCRECV(vc_socket_descriptor,receive_buffer,
+
msg_buffer_length,flags,option,result)
here = 9
IF (result .NE. 0) GO TO 99
C
C
C
C
C
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
If the receive_buffer contains the shutdown “message,” ipc4 will
call IPCSHUTDOWN to shut down its VC socket descriptor and
terminate the connection.
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
IF (receive_buffer .EQ. shut_down_message) THEN
flags = 0
write(1,’(“ipc4: shutting down connection (IPCShutdown).”)’)
CALL IPCSHUTDOWN(vc_socket_descriptor,flags,option,result)
here = 10
IF (result .NE. 0) GO TO 99
GO TO 100
! we’re done.
C
C
C
C
C
C
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Since the only data ipc4 receives from ipc3 is a shutdown message
it should never branch to the following ELSE statement. If this
process were the recipient of several IPCSEND calls, it should
call IPCRECV again.
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
ELSE
WRITE(1,’(10A2)’)(receive_buffer(index),index=1,10)
GO TO 30
ENDIF
99
WRITE (1, ’(“ipc4: result error code: ”,I4)’) result
WRITE (1, ’(“ipc4: at location: ”,I4)’) here
100
STOP
END
% 45(((((-9('($$