c - GWAN Key-Value persistent store -


I want to use the GWAN API key-value to record and read many data (in multi-threaded manner) . The problem is that my recording is only available on the current page and therefore can not be used on my other pages.

Can you show me an example or how to create a clear KV store (which will be accessible to all my subdomains)?

Here is an example that I currently use:

  KV_T Store; Kv_init (and store, "user", 10, 0, 0, 0); Kv_item item; Item.key = "pierre"; Item.klen = sizeof ("Pier") - 1; Item.val = "pierre@example.com"; Item.flags = 0; kv_add (and store, and items); Char * p = kv_get (and store, "pirie", size ("pierce") - 1); Xbuf_xcat (get_reply (argv), "& lt; br & gt; Pierce's email address:% s 
", p);

But not constantly.

Instead of being available for all scripts as G-Wan scripts, 'Global' variable 'static '(For each script) instead of compiled and linked.

Therefore, you will have to connect the KV Store continuously with Pointer G-WAN provides with various scopes:

  US_REQUEST_DATA = 200, // Request wide indicator US_HANDLER_DATA, // Shorter-wide pointer US_VHOST_DATA, // virtual-host-wide pointer US_SERVER_DATA, // global pointers (for maintenance scripts)   

Many G-Wan script examples show how Do:

etc.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -