CUBRID Engine  latest
tcp.h File Reference
#include "config.h"
#include "connection_defs.h"
#include <sys/socket.h>
Include dependency graph for tcp.h:

Go to the source code of this file.

Functions

int css_gethostname (char *name, size_t namelen)
 
unsigned int css_gethostid (void)
 
char * css_get_master_domain_path (void)
 
SOCKET css_tcp_client_open (const char *host, int port)
 
SOCKET css_tcp_client_open_with_retry (const char *host, int port, bool will_retry)
 
int css_tcp_master_open (int port, SOCKET *sockfd)
 
bool css_tcp_setup_server_datagram (const char *pathname, SOCKET *sockfd)
 
bool css_tcp_listen_server_datagram (SOCKET sockfd, SOCKET *newfd)
 
bool css_tcp_master_datagram (char *pathname, SOCKET *sockfd)
 
SOCKET css_master_accept (SOCKET sockfd)
 
SOCKET css_open_new_socket_from_master (SOCKET fd, unsigned short *rid)
 
bool css_transfer_fd (SOCKET server_fd, SOCKET client_fd, unsigned short rid, CSS_SERVER_REQUEST request)
 
void css_shutdown_socket (SOCKET fd)
 
int css_open_server_connection_socket (void)
 
void css_close_server_connection_socket (void)
 
SOCKET css_server_accept (SOCKET sockfd)
 
int css_get_max_socket_fds (void)
 
int css_tcp_client_open_with_timeout (const char *host, int port, int timeout)
 
int css_ping (SOCKET sd, struct sockaddr_in *sa_send, int timeout)
 
bool css_peer_alive (SOCKET sd, int timeout)
 
int css_hostname_to_ip (const char *host, unsigned char *ip_addr)
 
int css_get_peer_name (SOCKET sockfd, char *hostname, size_t len)
 
int css_get_sock_name (SOCKET sockfd, char *hostname, size_t len)
 

Function Documentation

void css_close_server_connection_socket ( void  )

Definition at line 1242 of file tcp.c.

char* css_get_master_domain_path ( void  )

Definition at line 155 of file tcp.c.

References envvar_get(), envvar_prefix(), NULL, and prm_get_master_port_id().

Referenced by css_master_cleanup(), css_process_kill_master(), css_sockaddr(), and css_tcp_master_open().

Here is the caller graph for this function:

int css_get_max_socket_fds ( void  )

Definition at line 1315 of file tcp.c.

int css_get_peer_name ( SOCKET  sockfd,
char *  hostname,
size_t  len 
)

Definition at line 1592 of file tcp.c.

int css_get_sock_name ( SOCKET  sockfd,
char *  hostname,
size_t  len 
)

Definition at line 1618 of file tcp.c.

unsigned int css_gethostid ( void  )

Definition at line 1209 of file tcp.c.

int css_gethostname ( char *  name,
size_t  namelen 
)

Definition at line 114 of file tcp.c.

int css_hostname_to_ip ( const char *  host,
unsigned char *  ip_addr 
)

Definition at line 227 of file tcp.c.

SOCKET css_master_accept ( SOCKET  sockfd)

Definition at line 836 of file tcp.c.

SOCKET css_open_new_socket_from_master ( SOCKET  fd,
unsigned short *  rid 
)

Definition at line 1059 of file tcp.c.

int css_open_server_connection_socket ( void  )

Definition at line 1228 of file tcp.c.

bool css_peer_alive ( SOCKET  sd,
int  timeout 
)

Definition at line 1470 of file tcp.c.

References ARG_FILE_LINE, css_ping(), er_log_debug, htons(), and SET_NONBLOCKING.

Referenced by css_connection_handler_thread(), and css_net_recv().

Here is the caller graph for this function:

int css_ping ( SOCKET  sd,
struct sockaddr_in *  sa_send,
int  timeout 
)

Referenced by css_peer_alive(), and in_cksum().

Here is the caller graph for this function:

SOCKET css_server_accept ( SOCKET  sockfd)

Definition at line 1256 of file tcp.c.

void css_shutdown_socket ( SOCKET  fd)

Definition at line 1179 of file tcp.c.

SOCKET css_tcp_client_open ( const char *  host,
int  port 
)

Definition at line 182 of file tcp.c.

SOCKET css_tcp_client_open_with_retry ( const char *  host,
int  port,
bool  will_retry 
)

Definition at line 414 of file tcp.c.

int css_tcp_client_open_with_timeout ( const char *  host,
int  port,
int  timeout 
)
bool css_tcp_listen_server_datagram ( SOCKET  sockfd,
SOCKET newfd 
)

Definition at line 930 of file tcp.c.

bool css_tcp_master_datagram ( char *  pathname,
SOCKET sockfd 
)

Definition at line 967 of file tcp.c.

int css_tcp_master_open ( int  port,
SOCKET sockfd 
)

Definition at line 663 of file tcp.c.

bool css_tcp_setup_server_datagram ( const char *  pathname,
SOCKET sockfd 
)
bool css_transfer_fd ( SOCKET  server_fd,
SOCKET  client_fd,
unsigned short  rid,
CSS_SERVER_REQUEST  request 
)

Definition at line 1122 of file tcp.c.