Sun Java System Web Server 6.1 SP6 NSAPI Programmer's Guide


The vs_set_data function sets the value of a pointer to data for a given virtual server and slot. The *slot must be -1 or a slot number returned from vs_alloc_slot. If *slot is -1, vs_set_data calls vs_alloc_slot implicitly and returns the new slot number in *slot.

Note that the stored pointer is maintained on a per-VirtualServer* basis, not a per-ID basis. Distinct VirtualServer*s from different configurations may exist simultaneously with the same virtual server IDs. However, since these are distinct VirtualServer*s, they each have their own VirtualServer*-specific data. As a result, vs_set_data should generally not be called outside of VSInitFunc processing (see vs_register_cb for an explanation of VSInitFunc processing).


void* vs_set_data(const VirtualServer* vs, int* slot, void* data);


Data on success, or NULL on failure.


const VirtualServer* vs represents the virtual server to set the pointer for.

int* slot is the slot number to store the pointer at.

void* data is the pointer to store.

See Also

vs_get_data, vs_alloc_slot, vs_register_cb