Gearman Developer Documentation

Data Structures | Modules | Functions
Connection Declarations
Gearmand Declarations

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_connection_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_connection_watch (gearman_connection_st *con, short events, void *context)

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_connection_add_fn add_fn 
)

Create a new gearmand connection.

Parameters:
gearmandServer instance structure previously initialized with gearmand_create.
fdFile descriptor of new connection.
hostHost of peer connection.
portPort of peer connection.
add_fnOptional 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:
dconConnection 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 160 of file gearmand_con.c.

gearman_return_t gearmand_connection_watch ( gearman_connection_st con,
short  events,
void *  context 
)

Callback function used for setting events in libevent.