srv_getuserdata

Returns a pointer to private data space in an SRV_PROC structure.

Syntax

void * srv_getuserdata ( SRV_PROC * srvproc );

where

srvproc
Is a pointer to the SRV_PROC structure that is the handle for a particular client connection. The structure contains all of the necessary control information that the Open Data Services server application uses to manage communications and data between the Open Data Services server application and the client.

Returns

A generic pointer to the private data space in the SRV_PROC structure. If an error occurs or if nothing is set with srv_setuserdata, returns NULL.

Remarks

Events associated with a client connection's SRV_PROC are activated either by a client request or by an Open Data Services request. A pointer to the activating event can be set by the srv_setuserdata function. This pointer to private data can be retrieved with srv_getuserdata.

Open Data Services server applications should be reentrant and avoid using global or static variables. Using private data eliminates the need for global or static variables.

See Also

This entry For information about
srv_setuserdata Saving a pointer to private data space in an SRV_PROC structure