Gearman Developer Documentation

Gearmand Connections

Data Structures

struct  gearmand_con_st

Modules

 Private Gearmand Connection Functions

Functions

gearman_return_t gearmand_con_create (gearmand_st *gearmand, int fd, const char *host, const char *port, gearman_con_add_fn *add_fn)
void gearmand_con_free (gearmand_con_st *dcon)
void gearmand_con_check_queue (gearmand_thread_st *thread)
gearman_return_t gearmand_con_watch (gearman_con_st *con, short events, void *arg)

Detailed Description

Connection handling for gearmand.


Function Documentation

gearman_return_t gearmand_con_create ( gearmand_st gearmand,
int  fd,
const char *  host,
const char *  port,
gearman_con_add_fn add_fn 
)

Create a new gearmand connection.

Parameters:
gearmand Server instance structure previously initialized with gearmand_create.
fd File descriptor of new connection.
host Host of peer connection.
port Port of peer connection.
add_fn Optional callback to use when adding the connection to an I/O thread.
Returns:
Pointer to an allocated gearmand structure.

Definition at line 38 of file gearmand_con.c.

void gearmand_con_free ( gearmand_con_st dcon  ) 

Free resources used by a connection.

Parameters:
dcon Connection previously initialized with gearmand_con_create.

Definition at line 127 of file gearmand_con.c.

void gearmand_con_check_queue ( gearmand_thread_st thread  ) 

Check connection queue for a thread.

Definition at line 158 of file gearmand_con.c.

gearman_return_t gearmand_con_watch ( gearman_con_st con,
short  events,
void *  arg 
)

Callback function used for setting events in libevent.


Generated on Tue Oct 13 20:19:22 2009 by  doxygen 1.6.1