Listening for Clients

After registering the protocol sequence, endpoint, and interface, and advertising the availability of the server application in the name-service database, the server calls RpcServerListen to indicate to the run-time library that it is ready to accept remote procedure calls from clients.

The OSF-DCE implementation of RpcServerListen does not return to the server application until another server thread calls RpcMgmtStopServerListening. The call to RpcServerListen ties up the server-manager thread.

Microsoft has extended the OSF-DCE definition of this function. You supply a flag that indicates whether to wait or to return immediately to the server application to allow further processing. When your server application uses this option, it can call a new function, RpcMgmtWaitServerListen, to perform the wait operation.

The wait functionality prevents the server from terminating an active client operation. When the server has selected the wait option by calling RpcServerListen or RpcMgmtWaitServerListen, the server waits until all client operations are complete before shutting down the server-manager application.