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.
Options for gearman_server_con_st.
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.
gearman_server_con_st* gearman_server_con_add | ( | gearman_server_thread_st * | thread, | |
int | fd, | |||
void * | data | |||
) |
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.
thread | Thread structure previously initialized with gearman_server_thread_create. | |
fd | File descriptor for a newly accepted connection. | |
data | Application data pointer. |
gearman_server_con_st* gearman_server_con_create | ( | gearman_server_thread_st * | thread | ) |
Initialize a server connection structure.
void gearman_server_con_free | ( | gearman_server_con_st * | con | ) |
Free a server connection structure.
gearman_con_st* gearman_server_con_con | ( | gearman_server_con_st * | con | ) |
Get gearman connection pointer the server connection uses.
void* gearman_server_con_data | ( | gearman_server_con_st * | con | ) |
Get application data pointer.
void gearman_server_con_set_data | ( | gearman_server_con_st * | con, | |
void * | data | |||
) |
Set application data pointer.
const char* gearman_server_con_host | ( | gearman_server_con_st * | con | ) |
Get client host.
void gearman_server_con_set_host | ( | gearman_server_con_st * | con, | |
const char * | host | |||
) |
Set client host.
const char* gearman_server_con_port | ( | gearman_server_con_st * | con | ) |
Get client port.
void gearman_server_con_set_port | ( | gearman_server_con_st * | con, | |
const char * | port | |||
) |
Set client port.
const char* gearman_server_con_id | ( | gearman_server_con_st * | con | ) |
Get client id.
void gearman_server_con_set_id | ( | gearman_server_con_st * | con, | |
char * | id, | |||
size_t | size | |||
) |
Set client id.
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.
void gearman_server_con_free_workers | ( | gearman_server_con_st * | con | ) |
Free all server worker structures for a server connection.
void gearman_server_con_io_add | ( | gearman_server_con_st * | con | ) |
Add connection to the io thread list.
void gearman_server_con_io_remove | ( | gearman_server_con_st * | con | ) |
Remove connection from the io thread list.
gearman_server_con_st* gearman_server_con_io_next | ( | gearman_server_thread_st * | thread | ) |
Get next connection from the io thread list.
void gearman_server_con_proc_add | ( | gearman_server_con_st * | con | ) |
Add connection to the proc thread list.
void gearman_server_con_proc_remove | ( | gearman_server_con_st * | con | ) |
Remove connection from the proc thread list.
gearman_server_con_st* gearman_server_con_proc_next | ( | gearman_server_thread_st * | thread | ) |
Get next connection from the proc thread list.
gearman_server_packet_st* gearman_server_packet_create | ( | gearman_server_thread_st * | thread, | |
bool | from_thread | |||
) |
Initialize a server packet structure.
void gearman_server_packet_free | ( | gearman_server_packet_st * | packet, | |
gearman_server_thread_st * | thread, | |||
bool | from_thread | |||
) |
Free a server connection structure.
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, | |||
... | ||||
) |
Add a server packet structure to io queue for a connection.
void gearman_server_io_packet_remove | ( | gearman_server_con_st * | con | ) |
Remove the first server packet structure from io queue for a connection.
void gearman_server_proc_packet_add | ( | gearman_server_con_st * | con, | |
gearman_server_packet_st * | packet | |||
) |
Add a server packet structure to proc queue for a connection.
gearman_server_packet_st* gearman_server_proc_packet_remove | ( | gearman_server_con_st * | con | ) |
Remove the first server packet structure from proc queue for a connection.