ARB
|
#include "arb_cs.h"
#include "arb_msg.h"
#include "arb_pattern.h"
#include "arb_string.h"
#include <smartptr.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/stat.h>
#include <netinet/tcp.h>
Go to the source code of this file.
Functions | |
static void | arb_gethostbyname (const char *name, struct hostent *&he, GB_ERROR &err) |
const char * | arb_gethostname () |
size_t | arb_socket_read (int socket, char *ptr, size_t size) |
ssize_t | arb_socket_write (int socket, const char *ptr, size_t size) |
static GB_ERROR | arb_open_unix_socket (char *name, bool do_connect, int *fd) |
static GB_ERROR | arb_open_tcp_socket (char *name, bool do_connect, int *fd) |
GB_ERROR | arb_open_socket (const char *name, bool do_connect, int *fd, char **filename_out) |
Definition at line 37 of file arb_cs.cxx.
References GBS_global_string(), and NULp.
Referenced by arb_open_tcp_socket().
const char* arb_gethostname | ( | ) |
Definition at line 51 of file arb_cs.cxx.
References ARB_strdup(), buffer, and gethostname().
Referenced by arb_open_tcp_socket(), and GB_host_is_local().
Definition at line 61 of file arb_cs.cxx.
Referenced by aisc_add_message_queue(), aisc_check_error(), aisc_get(), aisc_talking(), and aisc_talking_sets().
Definition at line 75 of file arb_cs.cxx.
References fputs().
Referenced by aisc_broadcast(), aisc_c_send_bytes_queue(), aisc_close(), aisc_create(), aisc_debug_info(), aisc_get(), aisc_init_client(), aisc_nput(), aisc_put(), aisc_s_send_bytes_queue(), and aisc_talking().
Definition at line 161 of file arb_cs.cxx.
References error(), GBS_global_string(), and NULp.
Referenced by arb_open_socket().
Definition at line 232 of file arb_cs.cxx.
References arb_gethostbyname(), arb_gethostname(), error(), GBS_global_string(), and NULp.
Referenced by arb_open_socket().
Opens and prepares a socket
If
name | begins with ":", the remainder is shell expanded and a unix socket is created. If |
contains | no ":" it must be numeric, giving the TCPport number to open. If |
contains | a ":" in the middle, the first part is considered the hostname and the latter part the port. |
name | name of port {[<host>:]<port>|:<filename>} |
do_connect | connect if true (client), otherwise bind (server) |
*fd | file descriptor of opened socket (out) or 0 (never returns <0!) |
filename_out | filename of unix socket (out) must be NULp or allocated (will be freed) |
Definition at line 124 of file arb_cs.cxx.
References arb_assert, arb_open_tcp_socket(), arb_open_unix_socket(), arb_shell_expand(), ARB_strdup(), error(), GB_incur_error(), and NULp.
Referenced by aisc_open(), gbcm_open_socket(), and open_aisc_server().