Skip to content

File cas_network.h

FileList > broker > cas_network.h

Go to the source code of this file

  • #include <string.h>
  • #include "cas_net_buf.h"

Classes

Type Name
struct MSG_HEADER

Public Functions

Type Name
void init_msg_header (MSG_HEADER * header)
bool is_net_timed_out (void)
SOCKET net_connect_client (SOCKET srv_sock_fd)
SOCKET net_connect_proxy (void)
int net_decode_str (char * msg, int msg_size, char * func_code, void *** ret_argv)
SOCKET net_init_env (char * port_name)
int net_read_header (SOCKET sock_fd, MSG_HEADER * header)
int net_read_int (SOCKET sock_fd, int * value)
int net_read_stream (SOCKET sock_fd, char * buf, int size)
int net_read_to_file (SOCKET sock_fd, int file_size, char * filename)
void net_timeout_set (int timeout_sec)
void net_write_error (SOCKET sock, int version, char * driver_info, char * cas_info, int cas_info_size, int indicator, int code, const char * msg)
int net_write_from_file (SOCKET sock_fd, int file_size, char * filename)
int net_write_header (SOCKET sock_fd, MSG_HEADER * header)
int net_write_int (SOCKET sock_fd, int value)
int net_write_stream (SOCKET sock_fd, const char * buf, int size)

Macros

Type Name
define MIN (X, Y) (([**X**](broker__monitor_8c.md#function-timeout)) &lt; ([**Y**](broker__monitor_8c.md#function-timeout)) ? ([**X**](broker__monitor_8c.md#function-timeout)) : ([**Y**](broker__monitor_8c.md#function-timeout)))
define MYSQL_CONNECT_TIMEOUT (5\*60\*60) /\* 5 hour. [**MySQL**](broker__monitor_8c.md#function-timeout) [**timeout**](broker__monitor_8c.md#function-timeout) = 8 hour \*/
define NET_ARG_GET_BIGINT (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_CACHE_TIME (CT, ARG) /* multi line expression */
define NET_ARG_GET_CCI_OBJECT (PAGEID, SLOTID, VOLID, ARG) /* multi line expression */
define NET_ARG_GET_CHAR (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_DATE (YEAR, MON, DAY, ARG) /* multi line expression */
define NET_ARG_GET_DATETIME (YR, MON, DAY, HH, MM, SS, MS, ARG) /* multi line expression */
define NET_ARG_GET_DOUBLE (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_FLOAT (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_INT (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_OBJECT (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_SHORT (VALUE, ARG) /* multi line expression */
define NET_ARG_GET_SIZE (SIZE, ARG) /* multi line expression */
define NET_ARG_GET_STR (VALUE, SIZE, ARG) /* multi line expression */
define NET_ARG_GET_TIME (HH, MM, SS, ARG) /* multi line expression */
define NET_ARG_GET_TIMESTAMP (YR, MON, DAY, HH, MM, SS, ARG) /* multi line expression */
define NET_DEFAULT_TIMEOUT 60
define NET_MIN_TIMEOUT 2

Public Functions Documentation

function init_msg_header

void init_msg_header (
    MSG_HEADER * header
) 

function is_net_timed_out

bool is_net_timed_out (
    void
) 

function net_connect_client

SOCKET net_connect_client (
    SOCKET srv_sock_fd
) 

function net_connect_proxy

SOCKET net_connect_proxy (
    void
) 

function net_decode_str

int net_decode_str (
    char * msg,
    int msg_size,
    char * func_code,
    void *** ret_argv
) 

function net_init_env

SOCKET net_init_env (
    char * port_name
) 

function net_read_header

int net_read_header (
    SOCKET sock_fd,
    MSG_HEADER * header
) 

function net_read_int

int net_read_int (
    SOCKET sock_fd,
    int * value
) 

function net_read_stream

int net_read_stream (
    SOCKET sock_fd,
    char * buf,
    int size
) 

function net_read_to_file

int net_read_to_file (
    SOCKET sock_fd,
    int file_size,
    char * filename
) 

function net_timeout_set

void net_timeout_set (
    int timeout_sec
) 

function net_write_error

void net_write_error (
    SOCKET sock,
    int version,
    char * driver_info,
    char * cas_info,
    int cas_info_size,
    int indicator,
    int code,
    const  char * msg
) 

function net_write_from_file

int net_write_from_file (
    SOCKET sock_fd,
    int file_size,
    char * filename
) 

function net_write_header

int net_write_header (
    SOCKET sock_fd,
    MSG_HEADER * header
) 

function net_write_int

int net_write_int (
    SOCKET sock_fd,
    int value
) 

function net_write_stream

int net_write_stream (
    SOCKET sock_fd,
    const  char * buf,
    int size
) 

Macro Definition Documentation

define MIN

#define MIN (
    X,
    Y
) `(( X ) < ( Y ) ? ( X ) : ( Y ))`

define MYSQL_CONNECT_TIMEOUT

#define MYSQL_CONNECT_TIMEOUT `(5*60*60)    /* 5 hour. MySQL  timeout = 8 hour */`

define NET_ARG_GET_BIGINT

#define NET_ARG_GET_BIGINT (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_CACHE_TIME

#define NET_ARG_GET_CACHE_TIME (
    CT,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_CCI_OBJECT

#define NET_ARG_GET_CCI_OBJECT (
    PAGEID,
    SLOTID,
    VOLID,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_CHAR

#define NET_ARG_GET_CHAR (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_DATE

#define NET_ARG_GET_DATE (
    YEAR,
    MON,
    DAY,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_DATETIME

#define NET_ARG_GET_DATETIME (
    YR,
    MON,
    DAY,
    HH,
    MM,
    SS,
    MS,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_DOUBLE

#define NET_ARG_GET_DOUBLE (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_FLOAT

#define NET_ARG_GET_FLOAT (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_INT

#define NET_ARG_GET_INT (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_OBJECT

#define NET_ARG_GET_OBJECT (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_SHORT

#define NET_ARG_GET_SHORT (
    VALUE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_SIZE

#define NET_ARG_GET_SIZE (
    SIZE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_STR

#define NET_ARG_GET_STR (
    VALUE,
    SIZE,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_TIME

#define NET_ARG_GET_TIME (
    HH,
    MM,
    SS,
    ARG
) `/* multi line expression */`

define NET_ARG_GET_TIMESTAMP

#define NET_ARG_GET_TIMESTAMP (
    YR,
    MON,
    DAY,
    HH,
    MM,
    SS,
    ARG
) `/* multi line expression */`

define NET_DEFAULT_TIMEOUT

#define NET_DEFAULT_TIMEOUT `60`

define NET_MIN_TIMEOUT

#define NET_MIN_TIMEOUT `2`


The documentation for this class was generated from the following file cubrid/src/broker/cas_network.h