|
mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
|
#include "protocol.h"Go to the source code of this file.
Functions | |
| int | send_cmd (struct protocol *cmd, int fd) |
| Serialize and transmit a renderd protocol command message over a socket. | |
| int | recv_cmd (struct protocol *cmd, int fd, int block) |
| Receive a renderd protocol command message from a socket. | |
| int recv_cmd | ( | struct protocol * | cmd, |
| int | fd, | ||
| int | block ) |
Receive a renderd protocol command message from a socket.
Performs a two-stage read to support backwards-compatible protocol versions:
| cmd | Destination struct protocol buffer (zero-initialized before reading). |
| fd | Connected socket file descriptor to read from. |
| block | Non-zero to block until the full message arrives (MSG_WAITALL), or 0 for non-blocking I/O (MSG_DONTWAIT). |
| int send_cmd | ( | struct protocol * | cmd, |
| int | fd ) |
Serialize and transmit a renderd protocol command message over a socket.
Validates the file descriptor and protocol version (1, 2, or 3), selects the wire structure size corresponding to cmd->ver (protocol_v1, protocol_v2, or full protocol v3), and sends the exact byte sequence via send().
| cmd | Pointer to the populated protocol command structure to transmit. |
| fd | Connected socket file descriptor. |