COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
covise::Socket Class Reference

#include <covise_socket.h>

Inheritance diagram for covise::Socket:
Inheritance graph
[legend]
Collaboration diagram for covise::Socket:
Collaboration graph
[legend]

Public Member Functions

 Socket (Host *h, int p, int retries=20, double timeout=0.0)
 
 Socket (int p)
 
 Socket (int *p)
 
 Socket ()
 
 Socket (int, int sfd)
 
 Socket (const Socket &)
 
 Socket (int socket_id, sockaddr_in *sockaddr)
 
virtual ~Socket ()
 
int get_start_port ()
 
ServerConnectioncopy_and_accept ()
 
SimpleServerConnectioncopySimpleAndAccept ()
 
int available (void)
 
int listen ()
 
virtual int accept ()
 
int acceptOnly ()
 
int accept (int)
 
int acceptOnly (int)
 
virtual int read (void *buf, unsigned nbyte)
 
virtual int Read (void *buf, unsigned nbyte)
 
int setNonBlocking (bool on)
 
virtual int write (const void *buf, unsigned nbyte)
 
int get_id ()
 
int get_port ()
 
Hostget_ip_alias (Host *)
 
Hostget_host ()
 
const char * get_hostname ()
 
void print ()
 
bool isConnected ()
 

Static Public Member Functions

static void initialize ()
 
static void uninitialize ()
 
static void set_start_port (int stp)
 
static int getErrno ()
 
static const char * coStrerror (int err)
 

Protected Member Functions

int setTCPOptions ()
 

Protected Attributes

struct sockaddr_in s_addr_in
 
Hosthost
 
int sock_id
 
int port
 
bool connected
 

Static Protected Attributes

static int stport = 31000
 
static char ** ip_alias_list = NULL
 
static Host ** host_alias_list = NULL
 
static bool bInitialised = false
 

Constructor & Destructor Documentation

Socket::Socket ( Host h,
int  p,
int  retries = 20,
double  timeout = 0.0 
)
Socket::Socket ( int  p)
Socket::Socket ( int *  p)
covise::Socket::Socket ( )
inline
Socket::Socket ( int  ,
int  sfd 
)
Socket::Socket ( const Socket s)
Socket::Socket ( int  socket_id,
sockaddr_in *  sockaddr 
)
Socket::~Socket ( )
virtual

Member Function Documentation

int Socket::accept ( )
virtual
int Socket::accept ( int  wait)
int Socket::acceptOnly ( )
int Socket::acceptOnly ( int  wait)
int Socket::available ( void  )
ServerConnection * Socket::copy_and_accept ( )
SimpleServerConnection * Socket::copySimpleAndAccept ( )
const char * Socket::coStrerror ( int  err)
static
Host* covise::Socket::get_host ( )
inline
const char * Socket::get_hostname ( )
int covise::Socket::get_id ( )
inline
Host * Socket::get_ip_alias ( Host test_host)
int covise::Socket::get_port ( )
inline
int covise::Socket::get_start_port ( )
inline
static int covise::Socket::getErrno ( )
inlinestatic
void Socket::initialize ( )
static
bool Socket::isConnected ( )
int Socket::listen ( )
void Socket::print ( void  )
int Socket::read ( void buf,
unsigned  nbyte 
)
virtual
int Socket::Read ( void buf,
unsigned  nbyte 
)
virtual
static void covise::Socket::set_start_port ( int  stp)
inlinestatic
int Socket::setNonBlocking ( bool  on)
int Socket::setTCPOptions ( )
protected
void Socket::uninitialize ( )
static
int Socket::write ( const void buf,
unsigned  nbyte 
)
virtual

Member Data Documentation

bool Socket::bInitialised = false
staticprotected
bool covise::Socket::connected
protected
Host* covise::Socket::host
protected
Host ** Socket::host_alias_list = NULL
staticprotected
char ** Socket::ip_alias_list = NULL
staticprotected
int covise::Socket::port
protected
struct sockaddr_in covise::Socket::s_addr_in
protected
int covise::Socket::sock_id
protected
int Socket::stport = 31000
staticprotected

The documentation for this class was generated from the following files: