[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_UrlSpecificAlloc

Overview

Return unique integer to use in other functions

Syntax

    int Ns_UrlSpecificAlloc(void);

Description

The Ns_UrlSpecificAlloc function returns a unique integer to be used in the Ns_UrlSpecific* storage functions below.

Examples

    static int myId;
    
    void
    Init(void)
    {
    	/* Allocate the id once at startup. */
    	myId = Ns_UrlSpecificAlloc();
    }
    
    void
    Store(char *server, char *method, char *url, char *data)
    {
    	Ns_UrlSpecificSet(server, method, url, myId,
    		data, 0, NULL);
    }
    
    char *
    Fetch(char *server, char *method, char *url)
    {
    	char *data;
    
    	data = Ns_UrlSpecificGet(server, method, url, myId);
    	return (char *) data;
    }
    

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.