Renesas REJ10J1822-0101 Computer Hardware User Manual


 
Section 8 Application Interface
Rev. 1.01 Mar. 17, 2008 Page 99 of 128
REJ10J1822-0101
8.5 Server-Shutdown Function
The server-shutdown function is called by the server application and stops the server by using
rpc_stop_server().
When SVR_NOSHUTDOWN has not been specified, RPCGEN generates a server-shutdown
function rpcsvr_<server name>_shutdown. RPCGEN outputs the server-shutdown function itself
to <config file>_svr.c and the prototype declaration to <config file>_svr.h.
<Server name> refers to the server name defined with SVR_NAME.
When SVR_NOSHUTDOWN has been specified, RPCGEN does not generate a server-shutdown
function. The server-shutdown function must be provided by the user if one is required.
The specification of the server-shutdown function generated by RPCGEN is as follows.
C-language API
INT32 rpcsvr_<server name>_shutdown(UINT32 __ulServerID, UINT32
__ulServerVersion);
Return value
The return value of rpc_stop_server()
Parameter: __ulServerID and __ulServerVersion
These parameters indicate the server ID and server version, respectively. When SVR_AUTH
has not been specified, however, the server ID and server version are ignored. Instead, the
macros RPCSVR_ID_<server name> and RPCSVR_VERS_<server name> output to <config
file>_public.h are taken as the server ID and server version in stopping the server.
Specification
The server is stopped by calling rpc_stop_server() and no callback function is specifiable for
the server-shutdown function. If you wish to use a callback function, specify
SVR_NOSHUTDOWN and implement the server-shutdown function on the user side.