srv_setevent

Activates an Open Data Services event outside the context of a client connection.

Syntax

int srv_setevent (
SRV_SERVER *
server,
int
event );

where

server
Is a pointer to the SRV_SERVER structure. Use srv_init to get this pointer.
event
Indicates the event to activate. This value can be one of the following:
Event Description
SRV_EXIT Shuts down the server immediately, regardless of whether further client events are pending
SRV_RESTART Continues the server after it has been paused
SRV_SLEEP Pauses the server; no new connections are allowed
SRV_STOP Disables new connections and then waits until all users have exited before shutting down the server

Returns

SUCCEED or FAIL.

Remarks

The srv_setevent function is usually used to shut down, pause, or continue the server in response to a Windows NT Service Control Manager request, or inside a ctrl+c handler. Unlike srv_event, srv_setevent does not require a SRV_PROC client connection handle.

See Also

This entry For information about
srv_event Activating a client event