ARB
Classes | Macros | Functions | Variables
client.c File Reference
#include <netdb.h>
#include <netinet/tcp.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h>
#include <cstdarg>
#include <arb_cs.h>
#include "client_privat.h"
#include "client.h"
#include "trace.h"
Include dependency graph for client.c:

Go to the source code of this file.

Classes

struct  client_msg_queue
 

Macros

#define aisc_assert(cond)   arb_assert(cond)
 
#define AISC_MAGIC_NUMBER_FILTER   0xffffff00
 
#define CORE()
 
#define ERRBUF_SIZE   300
 
#define PRTERR(msg)   if (aisc_print_error_to_stderr) fprintf(stderr, "%s: %s\n", msg, link->error);
 

Functions

static void aisc_c_add_to_bytes_queue (aisc_com *link, char *data, int size)
 
static int aisc_c_send_bytes_queue (aisc_com *link)
 
static int aisc_add_message_queue (aisc_com *link, long size)
 
static int aisc_check_error (aisc_com *link)
 
static long aisc_init_client (aisc_com *link)
 
static void aisc_free_link (aisc_com *link)
 
aisc_comaisc_open (const char *path, AISC_Object &main_obj, long magic, GB_ERROR *error)
 
int aisc_close (aisc_com *link, AISC_Object &object)
 
int aisc_get (aisc_com *link, int o_type, const AISC_Object &object,...)
 
longaisc_debug_info (aisc_com *link, int o_type, const AISC_Object &object, int attribute)
 
charpart_of (const char *str, size_t max_len, size_t str_len)
 
static int aisc_collect_sets (aisc_com *link, int mes_cnt, va_list parg, int o_type, int count)
 
int aisc_put (aisc_com *link, int o_type, const AISC_Object &object,...)
 
int aisc_nput (aisc_com *link, int o_type, const AISC_Object &object,...)
 
int aisc_create (aisc_com *link, int father_type, const AISC_Object &father, int attribute, int object_type, AISC_Object &object,...)
 

Variables

static const charerr_connection_problems = "CONNECTION PROBLEMS"
 
int aisc_core_on_error = 1
 
aisc_comaisc_client_link
 
static int aisc_print_error_to_stderr = 1
 
static char errbuf [ERRBUF_SIZE]
 

Macro Definition Documentation

#define aisc_assert (   cond)    arb_assert(cond)
#define AISC_MAGIC_NUMBER_FILTER   0xffffff00

Definition at line 30 of file client.c.

Referenced by aisc_check_error().

#define CORE ( )
Value:
do { \
ARB_SIGSEGV(true); \
} \
} while (0)
int aisc_core_on_error
Definition: client.c:34
#define ARB_SIGSEGV(backtrace)
Definition: arb_assert.h:174
GB_write_int const char GB_write_autoconv_string WRITE_SKELETON(write_pointer, GBDATA *,"%p", GB_write_pointer) char *AW_awa if)(!gb_var) return strdup("")
Definition: AW_awar.cxx:166

Definition at line 36 of file client.c.

Referenced by aisc_collect_sets(), aisc_create(), aisc_debug_info(), and aisc_get().

#define ERRBUF_SIZE   300

Definition at line 47 of file client.c.

Referenced by aisc_check_error().

#define PRTERR (   msg)    if (aisc_print_error_to_stderr) fprintf(stderr, "%s: %s\n", msg, link->error);

Function Documentation

static void aisc_c_add_to_bytes_queue ( aisc_com link,
char data,
int  size 
)
static
static int aisc_c_send_bytes_queue ( aisc_com link)
static
static int aisc_add_message_queue ( aisc_com link,
long  size 
)
static
static int aisc_check_error ( aisc_com link)
static
static long aisc_init_client ( aisc_com link)
static
static void aisc_free_link ( aisc_com link)
static

Definition at line 201 of file client.c.

Referenced by aisc_close(), and aisc_open().

aisc_com* aisc_open ( const char path,
AISC_Object main_obj,
long  magic,
GB_ERROR error 
)
int aisc_close ( aisc_com link,
AISC_Object object 
)
int aisc_get ( aisc_com link,
int  o_type,
const AISC_Object object,
  ... 
)
long* aisc_debug_info ( aisc_com link,
int  o_type,
const AISC_Object object,
int  attribute 
)
char* part_of ( const char str,
size_t  max_len,
size_t  str_len 
)
inline

Definition at line 418 of file client.c.

References aisc_assert, and copy().

Referenced by aisc_collect_sets().

static int aisc_collect_sets ( aisc_com link,
int  mes_cnt,
va_list  parg,
int  o_type,
int  count 
)
static
int aisc_put ( aisc_com link,
int  o_type,
const AISC_Object object,
  ... 
)
int aisc_nput ( aisc_com link,
int  o_type,
const AISC_Object object,
  ... 
)
int aisc_create ( aisc_com link,
int  father_type,
const AISC_Object father,
int  attribute,
int  object_type,
AISC_Object object,
  ... 
)

Variable Documentation

const char* err_connection_problems = "CONNECTION PROBLEMS"
static
int aisc_core_on_error = 1

Definition at line 34 of file client.c.

Referenced by ARB_main().

aisc_com* aisc_client_link

Definition at line 43 of file client.c.

int aisc_print_error_to_stderr = 1
static

Definition at line 45 of file client.c.

char errbuf[ERRBUF_SIZE]
static

Definition at line 48 of file client.c.

Referenced by aisc_check_error(), aisc_collect_sets(), aisc_get(), and formatted().