2
* Summary: Server structure used for libgearman.
4
* Copy: See Copyright for the status of this software.
9
#ifndef __GEARMAN_SERVER_H__
10
#define __GEARMAN_SERVER_H__
16
struct gearman_server_st {
17
char hostname[GEARMAN_MAX_HOST_LENGTH];
22
unsigned int cursor_active;
23
char write_buffer[GEARMAN_MAX_BUFFER];
24
size_t write_buffer_offset;
25
char read_buffer[GEARMAN_MAX_BUFFER];
26
size_t read_data_length;
27
size_t read_buffer_length;
29
gearman_allocated sockaddr_inited;
30
struct addrinfo *address_info;
32
gearman_server_type type;
36
gearman_return gearman_server_add(gearman_st *ptr, char *hostname,
39
#ifdef GEARMAN_INTERNAL
40
gearman_return gearman_server_add_internal(gearman_server_st *ptr, int fd);
41
gearman_return gearman_server_push(gearman_st *ptr, gearman_st *list);
42
void server_list_free(gearman_st *ptr, gearman_server_st *servers);
43
void gearman_server_free(gearman_server_st *ptr);
44
bool gearman_server_buffered(gearman_server_st *ptr);
47
gearman_return gearman_server_add(gearman_st *ptr,
51
#define gearman_server_count(A) (A)->number_of_hosts
52
#define gearman_server_name(A,B) (B).hostname
53
#define gearman_server_port(A,B) (B).port
54
#define gearman_server_list(A) (A)->hosts
55
#define gearman_server_response_count(A) (A)->cursor_active
62
#endif /* __GEARMAN_SERVER_H__ */