SysClientStream Class Reference

#include <SysCSStream.hpp>

Inheritance diagram for SysClientStream:
[legend]

Public Member Functions

 SysClientStream ()
 
 SysClientStream (const char *name)
 
 SysClientStream (const char *host, int port)
 
 ~SysClientStream ()
 
CSErrorCodeT getError (void)
 
bool open (const char *)
 
bool open (const char *, int)
 
bool close ()
 
void setDomain (int newdomain)
 
void setType (int newtype)
 
void setProtocol (int newprotocol)
 
bool isClean ()
 
 SysClientStream ()
 
 SysClientStream (const char *name)
 
 SysClientStream (const char *host, int port)
 
 ~SysClientStream ()
 
bool open (const char *)
 
bool open (const char *, int)
 
bool close ()
 
void setDomain (int newdomain)
 
void setType (int newtype)
 
void setProtocol (int newprotocol)
 
bool isClean ()
 
- Public Member Functions inherited from SysSocketConnection
 SysSocketConnection ()
 
 SysSocketConnection (int sock)
 
 ~SysSocketConnection ()
 
CSErrorCodeT getError (void)
 
bool read (void *buf, size_t bufsize, size_t *bytesread)
 
bool write (void *buf, size_t bufsize, size_t *byteswritten)
 
bool write (void *buf, size_t bufsize, void *buf2, size_t buf2size, size_t *byteswritten)
 
 SysSocketConnection ()
 
 SysSocketConnection (SOCKET sock)
 
 ~SysSocketConnection ()
 
CSErrorCodeT getError (void)
 
bool read (void *buf, size_t bufsize, size_t *bytesread)
 
bool write (void *buf, size_t bufsize, size_t *byteswritten)
 
bool write (void *buf, size_t bufsize, void *buf2, size_t buf2size, size_t *byteswritten)
 

Protected Attributes

int domain
 
int type
 
int protocol
 
- Protected Attributes inherited from SysSocketConnection
int c
 
CSErrorCodeT errcode
 
char * messageBuffer
 
SOCKET c
 

Additional Inherited Members

- Protected Types inherited from SysSocketConnection
enum  { MAX_CACHED_BUFFER = 4096 }
 
enum  { MAX_CACHED_BUFFER = 4096 }
 
- Protected Member Functions inherited from SysSocketConnection
char * getMessageBuffer (size_t size)
 
void returnMessageBuffer (void *)
 
char * getMessageBuffer (size_t size)
 
void returnMessageBuffer (void *)
 

Detailed Description

Definition at line 89 of file unix/SysCSStream.hpp.

Constructor & Destructor Documentation

◆ SysClientStream() [1/6]

SysClientStream::SysClientStream ( )

Standard constructor.

Definition at line 238 of file unix/SysCSStream.cpp.

References domain, protocol, and type.

◆ SysClientStream() [2/6]

SysClientStream::SysClientStream ( const char *  name)

Alternate constructor.

Parameters
nameHostname and port in the form "hostname:port".

Definition at line 251 of file unix/SysCSStream.cpp.

References domain, open(), protocol, and type.

◆ SysClientStream() [3/6]

SysClientStream::SysClientStream ( const char *  host,
int  port 
)

Alternate constructor.

Parameters
hostString name of the host.
portTarget port number.

Definition at line 266 of file unix/SysCSStream.cpp.

References domain, open(), protocol, and type.

◆ ~SysClientStream() [1/2]

SysClientStream::~SysClientStream ( )

Standard destructor.

Definition at line 278 of file unix/SysCSStream.cpp.

References SysSocketConnection::c, and close().

◆ SysClientStream() [4/6]

SysClientStream::SysClientStream ( )

◆ SysClientStream() [5/6]

SysClientStream::SysClientStream ( const char *  name)

◆ SysClientStream() [6/6]

SysClientStream::SysClientStream ( const char *  host,
int  port 
)

◆ ~SysClientStream() [2/2]

SysClientStream::~SysClientStream ( )

Member Function Documentation

◆ close() [1/2]

bool SysClientStream::close ( )

Close the connection to the host.

Returns
True on an error, otherwise false.

Definition at line 379 of file unix/SysCSStream.cpp.

References SysSocketConnection::c, CSERROR_OK, CSERROR_UNKNOWN, and SysSocketConnection::errcode.

Referenced by open(), and ~SysClientStream().

◆ close() [2/2]

bool SysClientStream::close ( )

◆ getError()

CSErrorCodeT SysClientStream::getError ( void  )
inline

Definition at line 96 of file unix/SysCSStream.hpp.

References SysSocketConnection::errcode.

◆ isClean() [1/2]

bool SysClientStream::isClean ( )
inline

Definition at line 117 of file unix/SysCSStream.hpp.

References CSERROR_OK, and SysSocketConnection::errcode.

Referenced by LocalAPIManager::returnConnection().

◆ isClean() [2/2]

bool SysClientStream::isClean ( )
inline

Definition at line 109 of file windows/SysCSStream.hpp.

References CSERROR_OK, and SysSocketConnection::errcode.

◆ open() [1/4]

bool SysClientStream::open ( const char *  name)

Open a connection to a host/port.

Parameters
nameHostname and port in the form "hostname:port".
Returns
True on an error, otherwise false.

Definition at line 294 of file unix/SysCSStream.cpp.

References CSERROR_HOSTNAME_PORT, and SysSocketConnection::errcode.

Referenced by LocalAPIManager::getConnection(), and SysClientStream().

◆ open() [2/4]

bool SysClientStream::open ( const char *  )

◆ open() [3/4]

bool SysClientStream::open ( const char *  host,
int  port 
)

Open a connection to a host/port.

Parameters
hostThe target host name.
portThe connection port number.
Returns
True on an error, otherwise false.

Definition at line 331 of file unix/SysCSStream.cpp.

References SysSocketConnection::c, close(), CSERROR_HOSTNAME_PORT, CSERROR_INTERNAL, CSERROR_OK, CSERROR_OPEN_FAILED, domain, SysSocketConnection::errcode, protocol, and type.

◆ open() [4/4]

bool SysClientStream::open ( const char *  ,
int   
)

◆ setDomain() [1/2]

void SysClientStream::setDomain ( int  newdomain)
inline

Definition at line 105 of file unix/SysCSStream.hpp.

References domain.

◆ setDomain() [2/2]

void SysClientStream::setDomain ( int  newdomain)
inline

Definition at line 97 of file windows/SysCSStream.hpp.

References domain.

◆ setProtocol() [1/2]

void SysClientStream::setProtocol ( int  newprotocol)
inline

Definition at line 113 of file unix/SysCSStream.hpp.

References protocol.

◆ setProtocol() [2/2]

void SysClientStream::setProtocol ( int  newprotocol)
inline

Definition at line 105 of file windows/SysCSStream.hpp.

References protocol.

◆ setType() [1/2]

void SysClientStream::setType ( int  newtype)
inline

Definition at line 109 of file unix/SysCSStream.hpp.

References type.

◆ setType() [2/2]

void SysClientStream::setType ( int  newtype)
inline

Definition at line 101 of file windows/SysCSStream.hpp.

References type.

Member Data Documentation

◆ domain

int SysClientStream::domain
protected

Definition at line 123 of file unix/SysCSStream.hpp.

Referenced by open(), setDomain(), and SysClientStream().

◆ protocol

int SysClientStream::protocol
protected

Definition at line 125 of file unix/SysCSStream.hpp.

Referenced by open(), setProtocol(), and SysClientStream().

◆ type

int SysClientStream::type
protected

Definition at line 124 of file unix/SysCSStream.hpp.

Referenced by open(), setType(), and SysClientStream().


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