Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions | Variables
com.c File Reference
#include "groonga_in.h"
#include <stdio.h>
#include <string.h>
#include "ctx_impl.h"
#include "ctx.h"
#include "com.h"
Include dependency graph for com.c:

Go to the source code of this file.

Macros

#define PF_INET   AF_INET
#define SOL_TCP   6
#define MSG_MORE   0
#define MSG_NOSIGNAL   0
#define LISTEN_BACKLOG   0x1000
#define RETRY_MAX   10
#define BUFSIZE   4096

Functions

grn_rc grn_com_queue_enque (grn_ctx *ctx, grn_com_queue *q, grn_com_queue_entry *e)
grn_com_queue_entrygrn_com_queue_deque (grn_ctx *ctx, grn_com_queue *q)
grn_objgrn_msg_open (grn_ctx *ctx, grn_com *com, grn_com_queue *old)
grn_objgrn_msg_open_for_reply (grn_ctx *ctx, grn_obj *query, grn_com_queue *old)
grn_rc grn_msg_close (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_msg_set_property (grn_ctx *ctx, grn_obj *obj, uint16_t status, uint32_t key_size, uint8_t extra_size)
grn_rc grn_msg_send (grn_ctx *ctx, grn_obj *msg, int flags)
grn_rc grn_com_init (void)
void grn_com_fin (void)
grn_rc grn_com_event_init (grn_ctx *ctx, grn_com_event *ev, int max_nevents, int data_size)
grn_rc grn_com_event_fin (grn_ctx *ctx, grn_com_event *ev)
grn_rc grn_com_event_add (grn_ctx *ctx, grn_com_event *ev, grn_sock fd, int events, grn_com **com)
grn_rc grn_com_event_mod (grn_ctx *ctx, grn_com_event *ev, grn_sock fd, int events, grn_com **com)
grn_rc grn_com_event_del (grn_ctx *ctx, grn_com_event *ev, grn_sock fd)
grn_rc grn_com_event_start_accept (grn_ctx *ctx, grn_com_event *ev)
grn_rc grn_com_event_stop_accept (grn_ctx *ctx, grn_com_event *ev)
grn_rc grn_com_event_poll (grn_ctx *ctx, grn_com_event *ev, int timeout)
grn_rc grn_com_send_http (grn_ctx *ctx, grn_com *cs, const char *path, uint32_t path_len, int flags)
grn_rc grn_com_send (grn_ctx *ctx, grn_com *cs, grn_com_header *header, const char *body, uint32_t size, int flags)
grn_rc grn_com_recv (grn_ctx *ctx, grn_com *com, grn_com_header *header, grn_obj *buf)
grn_comgrn_com_copen (grn_ctx *ctx, grn_com_event *ev, const char *dest, int port)
void grn_com_close_ (grn_ctx *ctx, grn_com *com)
grn_rc grn_com_close (grn_ctx *ctx, grn_com *com)
grn_rc grn_com_sopen (grn_ctx *ctx, grn_com_event *ev, const char *bind_address, int port, grn_msg_handler *func, struct hostent *he)
void grn_edges_init (grn_ctx *ctx, void(*dispatcher)(grn_ctx *ctx, grn_edge *edge))
void grn_edges_fin (grn_ctx *ctx)
grn_edgegrn_edges_add (grn_ctx *ctx, grn_com_addr *addr, int *added)
void grn_edges_delete (grn_ctx *ctx, grn_edge *edge)
grn_edgegrn_edges_add_communicator (grn_ctx *ctx, grn_com_addr *addr)
void grn_edge_dispatch (grn_ctx *ctx, grn_edge *edge, grn_obj *msg)

Variables

grn_hashgrn_edges = NULL
void(* grn_dispatcher )(grn_ctx *ctx, grn_edge *edge)

Macro Definition Documentation

#define BUFSIZE   4096

Definition at line 766 of file com.c.

#define LISTEN_BACKLOG   0x1000

Definition at line 458 of file com.c.

#define MSG_MORE   0

Definition at line 60 of file com.c.

#define MSG_NOSIGNAL   0

Definition at line 68 of file com.c.

#define PF_INET   AF_INET

Definition at line 45 of file com.c.

#define RETRY_MAX   10

Definition at line 749 of file com.c.

#define SOL_TCP   6

Definition at line 52 of file com.c.

Function Documentation

grn_rc grn_com_close ( grn_ctx ctx,
grn_com com 
)

Definition at line 998 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_com_close_ ( grn_ctx ctx,
grn_com com 
)

Definition at line 986 of file com.c.

Here is the caller graph for this function:

grn_com* grn_com_copen ( grn_ctx ctx,
grn_com_event ev,
const char *  dest,
int  port 
)

Definition at line 906 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_com_event_add ( grn_ctx ctx,
grn_com_event ev,
grn_sock  fd,
int  events,
grn_com **  com 
)

Definition at line 341 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_com_event_del ( grn_ctx ctx,
grn_com_event ev,
grn_sock  fd 
)

Definition at line 423 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_com_event_fin ( grn_ctx ctx,
grn_com_event ev 
)

Definition at line 321 of file com.c.

Here is the call graph for this function:

grn_rc grn_com_event_init ( grn_ctx ctx,
grn_com_event ev,
int  max_nevents,
int  data_size 
)

Definition at line 276 of file com.c.

Here is the call graph for this function:

grn_rc grn_com_event_mod ( grn_ctx ctx,
grn_com_event ev,
grn_sock  fd,
int  events,
grn_com **  com 
)

Definition at line 384 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_com_event_poll ( grn_ctx ctx,
grn_com_event ev,
int  timeout 
)

Definition at line 539 of file com.c.

grn_rc grn_com_event_start_accept ( grn_ctx ctx,
grn_com_event ev 
)

Definition at line 461 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_com_event_stop_accept ( grn_ctx ctx,
grn_com_event ev 
)

Definition at line 479 of file com.c.

Here is the call graph for this function:

void grn_com_fin ( void  )

Definition at line 268 of file com.c.

Here is the caller graph for this function:

grn_rc grn_com_init ( void  )

Definition at line 248 of file com.c.

Here is the caller graph for this function:

grn_com_queue_entry* grn_com_queue_deque ( grn_ctx ctx,
grn_com_queue q 
)

Definition at line 102 of file com.c.

Here is the caller graph for this function:

grn_rc grn_com_queue_enque ( grn_ctx ctx,
grn_com_queue q,
grn_com_queue_entry e 
)

Definition at line 73 of file com.c.

Here is the caller graph for this function:

grn_rc grn_com_recv ( grn_ctx ctx,
grn_com com,
grn_com_header header,
grn_obj buf 
)

Definition at line 831 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_com_send ( grn_ctx ctx,
grn_com cs,
grn_com_header header,
const char *  body,
uint32_t  size,
int  flags 
)

Definition at line 695 of file com.c.

Here is the caller graph for this function:

grn_rc grn_com_send_http ( grn_ctx ctx,
grn_com cs,
const char *  path,
uint32_t  path_len,
int  flags 
)

Definition at line 675 of file com.c.

Here is the call graph for this function:

grn_rc grn_com_sopen ( grn_ctx ctx,
grn_com_event ev,
const char *  bind_address,
int  port,
grn_msg_handler func,
struct hostent *  he 
)

Definition at line 1013 of file com.c.

Here is the call graph for this function:

void grn_edge_dispatch ( grn_ctx ctx,
grn_edge edge,
grn_obj msg 
)

Definition at line 1162 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_edge* grn_edges_add ( grn_ctx ctx,
grn_com_addr addr,
int *  added 
)

Definition at line 1122 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_edge* grn_edges_add_communicator ( grn_ctx ctx,
grn_com_addr addr 
)

Definition at line 1146 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_edges_delete ( grn_ctx ctx,
grn_edge edge 
)

Definition at line 1137 of file com.c.

Here is the call graph for this function:

void grn_edges_fin ( grn_ctx ctx)

Definition at line 1116 of file com.c.

Here is the call graph for this function:

void grn_edges_init ( grn_ctx ctx,
void(*)(grn_ctx *ctx, grn_edge *edge)  dispatcher 
)

Definition at line 1109 of file com.c.

Here is the call graph for this function:

grn_rc grn_msg_close ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 165 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_msg_open ( grn_ctx ctx,
grn_com com,
grn_com_queue old 
)

Definition at line 131 of file com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_msg_open_for_reply ( grn_ctx ctx,
grn_obj query,
grn_com_queue old 
)

Definition at line 153 of file com.c.

Here is the call graph for this function:

grn_rc grn_msg_send ( grn_ctx ctx,
grn_obj msg,
int  flags 
)

Definition at line 184 of file com.c.

Here is the call graph for this function:

grn_rc grn_msg_set_property ( grn_ctx ctx,
grn_obj obj,
uint16_t  status,
uint32_t  key_size,
uint8_t  extra_size 
)

Definition at line 173 of file com.c.

Variable Documentation

void(* grn_dispatcher)(grn_ctx *ctx, grn_edge *edge)

Definition at line 1106 of file com.c.

grn_hash* grn_edges = NULL

Definition at line 1105 of file com.c.