|
mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
|
Go to the source code of this file.
Macros | |
| #define | HTCP_EXPIRE_CACHE 1 |
| Feature flag enabling HTCP (Hyper Text Caching Protocol) tile cache purging. | |
| #define | HTCP_EXPIRE_CACHE_PORT "4827" |
| Default UDP destination port string for HTCP cache purge (CLR) requests. | |
Functions | |
| void | cache_expire (int sock, const char *host, const char *uri, int x, int y, int z) |
| Format a tile URL from Z/X/Y coordinates and send an HTCP purge request. | |
| int | init_cache_expire (const char *htcphost) |
| Initialize and connect a UDP socket to an HTCP caching server. | |
| #define HTCP_EXPIRE_CACHE 1 |
Feature flag enabling HTCP (Hyper Text Caching Protocol) tile cache purging.
| #define HTCP_EXPIRE_CACHE_PORT "4827" |
Default UDP destination port string for HTCP cache purge (CLR) requests.
| void cache_expire | ( | int | sock, |
| const char * | host, | ||
| const char * | uri, | ||
| int | x, | ||
| int | y, | ||
| int | z ) |
Format a tile URL from Z/X/Y coordinates and send an HTCP purge request.
Constructs a URL of the form http://<host><uri><z>/<x>/<y>.png (assuming uri includes leading and trailing slashes) and passes it to cache_expire_url().
| sock | Connected UDP socket descriptor returned by init_cache_expire(). If negative, the function returns immediately without action. |
| host | Target cache hostname or IP address (e.g., "tile.openstreetmap.org"). |
| uri | Base URI path prefix for the tileset (e.g., "/"). |
| x | Tile X coordinate. |
| y | Tile Y coordinate. |
| z | Tile zoom level. |
| int init_cache_expire | ( | const char * | htcphost | ) |
Initialize and connect a UDP socket to an HTCP caching server.
Resolves htcphost using HTCP_EXPIRE_CACHE_PORT and attempts to create and connect a SOCK_DGRAM socket against each resolved address until one succeeds.
| htcphost | Hostname or IP address string of the HTCP cache server. |