Certain events that happen within the lifetime of a service instance may be of interest to the service instance or to the application as a whole. RPC Manager looks for the existence of a module called RPCServerNotice() in the service code and in \Code for the application. If it finds such a module, it is called as a subroutine when the following events occur and with the listed notification code (supplied as a parameter):
Notification Code Reason
\RPCManager\
RPCCallbackRegistered The local service
instance has registered with RPC Manager.
\RPCManager\
RPCCallbackSessionClosed A session with a
remote service instance has been terminated.
\RPCManager\
RPCCallbackSessionOpen A session with a
remote service instance has been established.
\RPCManager\
RPCCallbackUnRegistered The local service
instance has unregistered with RPC Manager. Author's note: This appears to
happen when an application terminates. Surely there is nothing to call then?
\RPCManager\
RPCCallbackSocketOK A connection to a
remote workstation has been established (\Code call-back only).
\RPCManager\
RPCCallbackSocketLost A connection to a
remote workstation has been lost (\Code call-back only).
RPCServerNotice() is called with the following parameters:
RPCServerNotice(NotifyCode, IP, Name, LocalIP, LocalName,
WorkstationName, ShortName, SameAsLast);
Where:
NotifyCode One of the codes listed above.
IP The IP address of
the remote workstation. For codes
RPCCallbackRegistered and
RPCCallbackUnRegistered this value is
undefined.
Name The name of the
remote workstation. For codes
RPCCallbackRegistered and
RPCCallbackUnRegistered this value is
undefined.
LocalIP The IP of the local workstation. On a multi-homed network this could be any of the legal IP addresses by which this workstation is known.
LocalName The name of the local workstation.
WorkstationName The name of the local workstation, as determined by a WkStaInfo(0) statement. This is normally the same as the previous parameter.
ShortName Valid for \Code call-backs for service instance related events only. The name of the service to which the event relates.
SameAsLast Valid for \Code call-backs for service instance related events only. Non-zero if this notification is not the same as the previous notification for the same workstation.