Skip to content

File wintcp.c

FileList > connection > wintcp.c

Go to the source code of this file

  • #include "config.h"
  • #include <stdio.h>
  • #include <string.h>
  • #include <signal.h>
  • #include <sys/types.h>
  • #include <sys/timeb.h>
  • #include <winsock2.h>
  • #include <windows.h>
  • #include <ws2tcpip.h>
  • #include "dbtype.h"
  • #include "connection_error.h"
  • #include "connection_sr.h"
  • #include "error_manager.h"
  • #include "error_code.h"
  • #include "connection_globals.h"
  • #include "wintcp.h"
  • #include "host_lookup.h"
  • #include "porting.h"
  • #include "system_parameter.h"
  • #include "client_support.h"

Public Static Attributes

Type Name
const int css_Maximum_server_count = 1000
const int css_Tcp_max_connect_tries = 3
int css_Wsa_error = CSS\_ER\_WINSOCK\_NOERROR
int max_socket_fds = [**\_SYS\_OPEN**](broker__monitor_8c.md#function-timeout)
FARPROC old_hook = [**NULL**](freelistheap_8h.md#define-null)
unsigned int wsa_Init_count = 0

Public Functions

Type Name
void css_close_server_connection_socket (void)
int css_fd_down (SOCKET fd)
int css_get_max_socket_fds (void)
int css_get_peer_name (SOCKET sockfd, char * hostname, size_t len)
int css_get_sock_name (SOCKET sockfd, char * hostname, size_t len)
int css_get_wsa_error (void)
unsigned int css_gethostid (void)
int css_gethostname (char * name, size_t namelen)
int css_hostname_to_ip (const char * host, unsigned char * ip_addr)
SOCKET css_master_accept (SOCKET sockfd)
SOCKET css_open_new_socket_from_master (SOCKET fd, unsigned short * rid)
int css_open_server_connection_socket (void)
SOCKET css_server_accept (SOCKET sockfd)
void css_shutdown_socket (SOCKET fd)
SOCKET css_tcp_client_open (const char * host_name, int port)
SOCKET css_tcp_client_open_with_retry (const char * host_name, int port, bool will_retry)
bool css_tcp_listen_server_datagram (SOCKET sockfd, SOCKET * newfd)
bool css_tcp_master_datagram (char * pathname, SOCKET * sockfd)
int css_tcp_master_open (int port, SOCKET * sockfd)
bool css_tcp_setup_server_datagram (char * pathname, SOCKET * sockfd)
bool css_transfer_fd (SOCKET server_fd, SOCKET client_fd, unsigned short rid, CSS_SERVER_REQUEST request)
bool css_windows_blocking_hook (void)
void css_windows_shutdown (void)
int css_windows_startup (void)

Public Static Functions

Type Name
SOCKET css_accept (SOCKET sockfd)
unsigned int css_fd_error (SOCKET fd)

Macros

Type Name
define HOST_ID_ARRAY_SIZE 8

Public Static Attributes Documentation

variable css_Maximum_server_count

const int css_Maximum_server_count;

variable css_Tcp_max_connect_tries

const int css_Tcp_max_connect_tries;

variable css_Wsa_error

int css_Wsa_error;

variable max_socket_fds

int max_socket_fds;

variable old_hook

FARPROC old_hook;

variable wsa_Init_count

unsigned int wsa_Init_count;

Public Functions Documentation

function css_close_server_connection_socket

void css_close_server_connection_socket (
    void
) 

function css_fd_down

int css_fd_down (
    SOCKET fd
) 

function css_get_max_socket_fds

int css_get_max_socket_fds (
    void
) 

function css_get_peer_name

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

function css_get_sock_name

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

function css_get_wsa_error

int css_get_wsa_error (
    void
) 

function css_gethostid

unsigned  int css_gethostid (
    void
) 

function css_gethostname

int css_gethostname (
    char * name,
    size_t namelen
) 

function css_hostname_to_ip

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

function css_master_accept

SOCKET css_master_accept (
    SOCKET sockfd
) 

function css_open_new_socket_from_master

SOCKET css_open_new_socket_from_master (
    SOCKET fd,
    unsigned  short * rid
) 

function css_open_server_connection_socket

int css_open_server_connection_socket (
    void
) 

function css_server_accept

SOCKET css_server_accept (
    SOCKET sockfd
) 

function css_shutdown_socket

void css_shutdown_socket (
    SOCKET fd
) 

function css_tcp_client_open

SOCKET css_tcp_client_open (
    const  char * host_name,
    int port
) 

function css_tcp_client_open_with_retry

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

function css_tcp_listen_server_datagram

bool css_tcp_listen_server_datagram (
    SOCKET sockfd,
    SOCKET * newfd
) 

function css_tcp_master_datagram

bool css_tcp_master_datagram (
    char * pathname,
    SOCKET * sockfd
) 

function css_tcp_master_open

int css_tcp_master_open (
    int port,
    SOCKET * sockfd
) 

function css_tcp_setup_server_datagram

bool css_tcp_setup_server_datagram (
    char * pathname,
    SOCKET * sockfd
) 

function css_transfer_fd

bool css_transfer_fd (
    SOCKET server_fd,
    SOCKET client_fd,
    unsigned  short rid,
    CSS_SERVER_REQUEST request
) 

function css_windows_blocking_hook

bool css_windows_blocking_hook (
    void
) 

function css_windows_shutdown

void css_windows_shutdown (
    void
) 

function css_windows_startup

int css_windows_startup (
    void
) 

Public Static Functions Documentation

function css_accept

static SOCKET css_accept (
    SOCKET sockfd
) 

function css_fd_error

static unsigned  int css_fd_error (
    SOCKET fd
) 

Macro Definition Documentation

define HOST_ID_ARRAY_SIZE

#define HOST_ID_ARRAY_SIZE `8`


The documentation for this class was generated from the following file cubrid/src/connection/wintcp.c