unix_socket Class Reference

#include <unisock.h>

Inheritance diagram for unix_socket:

socket_t

List of all members.

Public Member Functions

bool open (int listen_queue_size)
bool connect (int max_attempts, time_t timeout)
int read (void *buf, size_t min_size, size_t max_size, time_t timeout)
bool write (void const *buf, size_t size, time_t timeout)
bool is_ok ()
bool shutdown ()
bool close ()
char * get_peer_name ()
void get_error_text (char *buf, size_t buf_size)
socket_taccept ()
bool cancel_accept ()
int get_handle ()
 unix_socket (const char *address, socket_domain domain)
 unix_socket (int new_fd)
 ~unix_socket ()

Static Public Attributes

static char * unix_socket_dir = SIPX_TMPDIR

Protected Types

enum  error_codes {
  ok = 0,
  not_opened = -1,
  bad_address = -2,
  connection_failed = -3,
  broken_pipe = -4,
  invalid_access_mode = -5
}

Protected Attributes

int fd
int errcode
char * address
socket_domain domain
bool create_file


Member Enumeration Documentation

enum error_codes [protected]

Enumerator:
ok 
not_opened 
bad_address 
connection_failed 
broken_pipe 
invalid_access_mode 


Constructor & Destructor Documentation

unix_socket ( const char *  address,
socket_domain  domain 
)

unix_socket ( int  new_fd  ) 

~unix_socket (  ) 


Member Function Documentation

bool open ( int  listen_queue_size  ) 

bool connect ( int  max_attempts,
time_t  timeout 
)

int read ( void *  buf,
size_t  min_size,
size_t  max_size,
time_t  timeout 
) [virtual]

Implements socket_t.

bool write ( void const *  buf,
size_t  size,
time_t  timeout 
) [virtual]

Implements socket_t.

bool is_ok (  )  [virtual]

Implements socket_t.

bool shutdown (  )  [virtual]

Implements socket_t.

bool close (  )  [virtual]

Implements socket_t.

char * get_peer_name (  )  [virtual]

Implements socket_t.

void get_error_text ( char *  buf,
size_t  buf_size 
) [virtual]

Implements socket_t.

socket_t * accept (  )  [virtual]

Implements socket_t.

bool cancel_accept (  )  [virtual]

Implements socket_t.

int get_handle (  )  [virtual]

Implements socket_t.


Member Data Documentation

int fd [protected]

int errcode [protected]

char* address [protected]

socket_domain domain [protected]

bool create_file [protected]

char * unix_socket_dir = SIPX_TMPDIR [static]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:13:23 build16 abuild