Data Structures |
struct | gearman_server_con_st |
struct | gearman_server_packet_st |
Enumerations |
enum | gearman_server_con_options_t { GEARMAN_SERVER_CON_SLEEPING = (1 << 0),
GEARMAN_SERVER_CON_EXCEPTIONS = (1 << 1),
GEARMAN_SERVER_CON_DEAD = (1 << 2),
GEARMAN_SERVER_CON_NOOP_SENT = (1 << 3)
} |
Functions |
gearman_server_con_st * | gearman_server_con_add (gearman_server_thread_st *thread, int fd, void *data) |
gearman_server_con_st * | gearman_server_con_create (gearman_server_thread_st *thread) |
void | gearman_server_con_free (gearman_server_con_st *con) |
gearman_con_st * | gearman_server_con_con (gearman_server_con_st *con) |
void * | gearman_server_con_data (gearman_server_con_st *con) |
void | gearman_server_con_set_data (gearman_server_con_st *con, void *data) |
const char * | gearman_server_con_host (gearman_server_con_st *con) |
void | gearman_server_con_set_host (gearman_server_con_st *con, const char *host) |
const char * | gearman_server_con_port (gearman_server_con_st *con) |
void | gearman_server_con_set_port (gearman_server_con_st *con, const char *port) |
const char * | gearman_server_con_id (gearman_server_con_st *con) |
void | gearman_server_con_set_id (gearman_server_con_st *con, char *id, size_t size) |
void | gearman_server_con_free_worker (gearman_server_con_st *con, char *function_name, size_t function_name_size) |
void | gearman_server_con_free_workers (gearman_server_con_st *con) |
void | gearman_server_con_io_add (gearman_server_con_st *con) |
void | gearman_server_con_io_remove (gearman_server_con_st *con) |
gearman_server_con_st * | gearman_server_con_io_next (gearman_server_thread_st *thread) |
void | gearman_server_con_proc_add (gearman_server_con_st *con) |
void | gearman_server_con_proc_remove (gearman_server_con_st *con) |
gearman_server_con_st * | gearman_server_con_proc_next (gearman_server_thread_st *thread) |
gearman_server_packet_st * | gearman_server_packet_create (gearman_server_thread_st *thread, bool from_thread) |
void | gearman_server_packet_free (gearman_server_packet_st *packet, gearman_server_thread_st *thread, bool from_thread) |
gearman_return_t | gearman_server_io_packet_add (gearman_server_con_st *con, bool take_data, gearman_magic_t magic, gearman_command_t command, const void *arg,...) |
void | gearman_server_io_packet_remove (gearman_server_con_st *con) |
void | gearman_server_proc_packet_add (gearman_server_con_st *con, gearman_server_packet_st *packet) |
gearman_server_packet_st * | gearman_server_proc_packet_remove (gearman_server_con_st *con) |
Detailed Description
This is a low level interface for gearman server connections. This is used internally by the server interface, so you probably want to look there first.
Enumeration Type Documentation
Options for gearman_server_con_st.
- Enumerator:
GEARMAN_SERVER_CON_SLEEPING |
|
GEARMAN_SERVER_CON_EXCEPTIONS |
|
GEARMAN_SERVER_CON_DEAD |
|
GEARMAN_SERVER_CON_NOOP_SENT |
|
Definition at line 84 of file constants.h.
Function Documentation
Add a connection to a server thread. This goes into a list of connections that is used later with server_thread_run, no socket I/O happens here.
- Parameters:
-
| thread | Thread structure previously initialized with gearman_server_thread_create. |
| fd | File descriptor for a newly accepted connection. |
| data | Application data pointer. |
- Returns:
- Gearman server connection pointer.
Definition at line 20 of file conn.c.
Initialize a server connection structure.
Definition at line 49 of file conn.c.
Free a server connection structure.
Definition at line 109 of file conn.c.
Get gearman connection pointer the server connection uses.
Definition at line 165 of file conn.c.
Get application data pointer.
Definition at line 170 of file conn.c.
Set application data pointer.
Definition at line 175 of file conn.c.
Get client host.
Definition at line 180 of file conn.c.
Set client host.
Definition at line 185 of file conn.c.
Get client port.
Definition at line 190 of file conn.c.
Set client port.
Definition at line 195 of file conn.c.
Get client id.
Definition at line 200 of file conn.c.
Set client id.
Definition at line 205 of file conn.c.
void gearman_server_con_free_worker |
( |
gearman_server_con_st * |
con, |
|
|
char * |
function_name, |
|
|
size_t |
function_name_size | |
|
) |
| | |
Free server worker struction with name for a server connection.
Definition at line 215 of file conn.c.
Free all server worker structures for a server connection.
Definition at line 245 of file conn.c.
Add connection to the io thread list.
Definition at line 251 of file conn.c.
Remove connection from the io thread list.
Definition at line 271 of file conn.c.
Get next connection from the io thread list.
Definition at line 283 of file conn.c.
Add connection to the proc thread list.
Definition at line 295 of file conn.c.
Remove connection from the proc thread list.
Definition at line 315 of file conn.c.
Get next connection from the proc thread list.
Definition at line 327 of file conn.c.
Initialize a server packet structure.
Definition at line 21 of file packet.c.
Free a server connection structure.
Definition at line 61 of file packet.c.
Add a server packet structure to io queue for a connection.
Definition at line 89 of file packet.c.
Remove the first server packet structure from io queue for a connection.
Definition at line 154 of file packet.c.
Add a server packet structure to proc queue for a connection.
Definition at line 167 of file packet.c.
Remove the first server packet structure from proc queue for a connection.
Definition at line 178 of file packet.c.